Another aspect of illegal migration which is seldom discussed it that it also depletes the exporting country of some of their most capable workers.
Costa Rica, which was just another Central American banana republic in 1950, has built a highly functional country because their most capable people have stayed there to do it rather than migrated north to earn cash to send back. This point seldom gets made.
The ethnic makeup of Costa Rica is also superior to that of other Central American countries. It’s more European and less of the uneducated Indian peasants of say Guatemala and Honduras.