There needs to be a few things in place.
1) a path towards legal residency and possibly citizenship. Could include a touchback, a background check, a time frame without conviction or serious arrest, a demonstration of willingness to work, train or get education. But there should be a way.
2) put the onus on businesses to hire legally or pass bills to permit legal hiring of migrants and immigrants with appropriate pay/benefits. If a business hires an illegal without permit, there should be a very steep fine. Money is what businesses understand.
3) ssn issued and comprehensive background check here and wherever they emigrated from. If conviction of anything remotely serious, DUI and up, denied and kicked out.
These are the basics as I see it.