It's not about class for me. For decades immigrants came to America, and few cared about how poor they were. The US did fine during that time, though for a while it was hard for the immigrants as they worked hard, low-paying jobs usually. My wife's grandfathers died early, one from working the coal mines, and the other I forget how exactly but it involved going from inside a freezer and out into warmer air. By the next generation my wife's mother and father were living comfortably.
The immigrants in the end help the country they are going to, and if conditions are tough at first they apply themselves and make a life for themselves or their children. Back in the country they lived in in some cases they were mired in whatever circumstances they found themselves in and never got out.
The reason that immigration slowed down was prejudice towards race for the most part.