>I mean, any system or nation can be overwhelmed by too many people.
How weird, there's more than enough food and houses to provide it to everyone in the US... and yet there are still thousands of homeless working class people or people who have to rent a shitty apartment, and some can't even eat 3 times a day.
The most important cause of mass migration is imperialism (exploitation of a smaller, less developed country by a powerful one), which includes things like stealing natural resources (often selling the finished products back to the population), borderline slavery (putting factories there for much cheaper labor than in the richer country) and war (causes chaos and destruction, and usually comes with human rights violations against innocents by the imperialists).
To help with this process, the imperialist power has to destabilize the country so that it will be allowed to do as it pleases there; this can be achieved by backing coups and friendly candidates, declaring a war on some made up problem (war on drugs, war on terrorism, etc. all of which are also created or backed by the imperialist power in the first place), placing embargoes, spreading imperialist propaganda in and outside the country, sending undercover agents or provocateurs to incite violence among the populace or damage a group's reputation, sabotage industries, etc. And this can all be used to justify an intervention and straight up take total control of the country.
It's only after all this that the shit you said matters. Who wouldn't want to flee to a safer, richer country after theirs has been obliterated by a world power? But as long as these things don't happen, most people won't even think about leaving their homeland.
And you can bet your ass that those "free benefits" that some countries like Gringoland give to jobless people only help attract migrants from war-torn, corrupt shitholes, and that's good for those at the top, because mass immigration causes wages to go down or stagnate while prices keep going up, so they keep getting richer. Tensions also keep growing between the migrants and non-migrants, and this can manifest in a variety of ways such as racial, religious, linguistic classist or political discrimination and hatred, which transforms into ultra-nationalism and xenophobia (along with overly pro-migrant sentiments to oppose it), distracting the masses from the real cause of these problems.
And guess what? The rich don't give a shit about the problems of either group of people, they don't care about the bombed schools in the Middle East where hundreds of kids died, or the decapitations and disappearances in Mexico and El Salvador at the hands of narco-regimes, or the people who are escaping from such things, or the Americans who are losing their jobs or not getting a good enough salary to cover their most basic needs, and those who have to resort to crime to survive, and those who suffer for those crimes. All the better for them. They just don't care about us. Their power depends on the ignorance of the masses.
And yes, overpopulation can sometimes be a problem, but with efficient planning (for the benefit of the people, not the rich)
and low corruption levels things can go smoothly. Especially when considering the technology we have now, "overpopulation" is not an excuse for inefficiency, lack of jobs and low quality of life in 99% of cases. If it ever becomes a genuine problem, it can be solved with family planning like what China did with its "1 child per couple" policy.
I'd recommend this video. https://www.youtube.com/watch?v=w3NtIiBjPsE