... they could go back many generations, find the initial immigrant ancestor, decide that immigrant ancestor was "illegal", and then strip their descendants of their citizenship.
It would be applied selectively, as it was during the 1919 Palmer Raids:
That mornings mass deportation had been preceded by a crescendo of anti-immigrant rhetoric that will sound distinctly familiar today. The surest way to preserve the public against those disciples of destruction, Thomas Edward Campbell, the governor of Arizona, told a conference of newspaper editors on February 22, 1919, is to send them back forthwith to lands from which they came. And if native-born Americans were acting un-American, why not deport them, too? Senator Kenneth McKellar, of Tennessee, suggested that they be deported permanently to the Island of Guam.
And why not go one step further and strip objectionable people of U.S. citizenship, to make them more deportable? In 1919, alarmed by the growing presence of peoples of Asiatic races, the Anti-Alien League called for a constitutional amendment to restrict citizenship by birth within the United States to the children of parents who are of a race which is eligible for citizenshipi.e., whites. Senator Wesley Jones, of Washington State, promised to introduce such a measurea proposal not unlike todays calls to end birthright citizenship. That May, a cheering convention of the American Legion demanded the deportation not only of immigrants who evaded military service during the First World War but of any men who evaded service.
https://www.newyorker.com/magazine/2019/11/11/when-america-tried-to-deport-its-radicals