Case in point, USA vs. Mexico. We know the U.S. is more prosperous in an overall sense, and has numerous government assistance programs, modern healthcare, minimum wage and labor protection laws, and much more.
Mexico, unfortunately, is not so prosperous, apparently; else the number of border-crossing-illegal-immigrants would not be what it is. Most are seeking "a better life", where they (presumably) can earn much more than what they can earn at home...not to mention all the 'programs', right?
So...is the right answer really to build impenetrable walls and spend countless billions monitoring, maintaining, and otherwise managing all the goings on that such walls require?