It's called
collective punishment and it proved quite effective when employed by Hitler and Stalin among others as argued by Alan Dershowitz of all people. Maybe Trump read his book.
I don't see any USA government actually resorting to such unless the shit really hits the fan however.