Mexico did it.
And continues doing it.
An oft repeated solution is Temporal Reciprocity."
Apply the immigration laws of Mexico as it applies to Mexican and Latin American illegals.
When their laws become benevolent, we can stop beng "heartless and mean-spirited." Totally up to them.