It occurs to me there may be a simpler solution.
It entails every foreign national registering with the Municipality, County or State government (whichever government entity takes responsibility) in five business days after arrival or face expulsion, arrest or both. Aliens that are determined as long term illegal status and still reside in the jurisdiction (after a court appearance) could also be subject to forfeiture of personal property.

It’s impossible for lawful failure to register to be discriminatory; all aliens would be required to perform this action. None would be singled out.
The burden of proving individual immigration status would fall to qualified government employees.
The punishment for failure would also be nondiscriminatory as it too would be the same for all foreign nationals.
The first actions of the jurisdiction would be as simple as putting up signs at the boundaries in order that everyone who enters would have no excuse if called to account. They could also be warned that they may well be asked of their visitation status.
Asking if a person is a visitor and if they have registered would not violate anyone’s rights. This is no different than what Americans do in some other Countries and could be handled in a tourist friendly manner by the Police.
An alien that has thus registered is then eligible to work, rent, send their kids to school and feel secure in the community.

This action doesn’t have the teeth some other laws might have, but it wouldn’t be as vulnerable to legal attack either and recently we have seen that ‘some’ enforcement has shown considerable effect. This would be compassion and enforcement.

Maybe?