You continue to discuss means to stop aliens coming in illegally at some undefined point in the future, and are not discussing those aliens who are already here and working.
The ten million who are already here illegally are not seeking work, they already have work.
So in effect, the first order of business would be to dislodge illegal aliens already HERE and working, and replacing them with legal immigrants.
That's the part no one addresses.
You are correct. The illegals would tend to lose their jobs, at least temporarily.