Immigration/migration is a normal process of societal fluid, but all human governments want to control that. It is normal to see people, that they are living in third world shitholes countries, want to go to first world countries, holding the hope for a better life.
The only way to stop illegal immigration in a human way is to turn every country of this planet into a living utopia. In other words, turn every part of this planet into a heaven (heavens) instead of the current situation (hellish places). That process could be accelerated with the use of advanced technology (robots and artificial intelligence (programs)).