The bolded part is the devil you're looking for. The reason firms take most of the gains has to do with class inequality; there are any number of possibilities as to why this exists, which deserve a thread of their own, but shutting down immigration won't get rich people to start giving a shit about the common man. At best, it'll be a feel-good exercise that ends in complete disappointment... kind of like electing Donald Trump.
According to that chart, the proportion of immigrants was higher between the 1860s and 1910s than it is today, and much higher than it was during the 70s-80s when real incomes were beginning to stagnate. If immigrants are indeed the driving force behind stagnation, that chart has to be one of the worst pieces of evidence for it.Probably because the US was still something of a developing country, and we weren't letting in crazy amounts of people like now:
Quite the inflection point circa ~1970. Maybe a little too coincidental with post-1964 wage stagnation.