The obvious technical solution is to greatly increase the number of legal immigration slots--boom, problem solved, everyone now has legal status.
Unfortunately this solution would not change the conversation. Why? Because most anti-immigration folks are not concerned about protecting immigrants from exploitation, they are concerned about Mexicans and Muslims. A bunch of legal Mexicans moving into their town is no better to them than a bunch of illegal Mexicans.
In fact they prefer to keep the system the broken way it is now, because it gives them a "rule of law" fig leaf to place over their racism.
There is a tremendous amount of work and economy in cities like Houston done by illegal immigrants. Ethics aside, there are those who benefit from this arrangement.