The migrants who helped build America largely came across legally with paperwork.
Yes they did. America was industrializing and needed the labor to support it. Approximately 25 million people emigrated from across Europe to America last century. Although reasons to leave Europe obviously varied clearly the ability to do so was well organized from regularly scheduled passenger ships leaving Europe to established immigration centers at the arrival ports of entry.
So it is simply buffoonish for anyone to claim that European migrants were illiterate, undocumented, and simply showed up unannounced.
There were jobs in the Americas. Industry needed them. The American and other government were onboard with this and facilitated it. Why didn't Europe stop the people leaving? Because there was actually a surplus of labor in Europe and there was money to be made as well from the passenger companies.
Remittances are not new and migrants to the Americas often sent money back to relatives (usually elderly parents) who stayed behind.
And the migrants were skilled. Very skilled. Countries like America, Canada and even Brazil and Argentina could never have expanded and rapidly built their cities and infrastructure if their migrants were a bunch of morons. In fact, many trades like intricate masonry, embroidery, woodcarving, etc. are now mostly lost skills in America. That sort of talent was originally brought over from Europe.
And since immigrant countries like America didn't have any state provided social safety nets at the time of mass migration from Europe it was clearly a case of only the most talented being able to survive and provide for their offspring. Unlike today where migrants are attracted to handouts and no questions asked tax avoidance for any work they decide to do. Migrants who left Europe in the last century however pretty much knew what they were getting into but were willing to accept the challenges ahead of them.
And it is a complete myth started and perpetuated by Anglocentric bigots that migrants couldn't even spell their names. Most migrants were schooled, literate, and could even do maths. Obviously not in English though. The problem therefore was when the migrants encountered English speaking immigration officials (virtually all of them with ancestry from the British Isles) who were completely ignorant of and disrespectful if not outright hostile towards other ethnic groups. That is why so many non-English speaking migrants and their descendants today (especially Poles) had their names mangled or complete changed so the English speaking majority and its officialdom at the time could be accommodated and not feel threatened.
Any name with too many consonants and more than two syllables left the English speaking Anglophile Americans and Canadians slurring and stammering as they attempted and failed to pronounce immigrant names properly and respectfully. Being too dumb and proud to learn they just bullied immigrants into conforming to their overly simplistic and boring Jane Brown and Bob Smith monikers.