Thinking more about the parallels between the coming Bernie realignment and the Lincoln realignment that led to the Gilded Age -- with the Reagan era paralleling the Jacksonian era -- it might not be so bad this time around regarding open borders and cheap labor.
Open borders is implemented by the elites to lower the labor costs for employers in labor-intensive sectors, such as agriculture, manufacturing, security / armed forces, and material services (retail, food, nail trimming, etc.).
Employers of non-labor-intensive sectors do not benefit much -- that includes finance, info-tech, and media / entertainment. They could have fully unionized workforces with astronomical salaries, and it wouldn't be a drop in the bucket of the employers' costs because hardly anyone works in those sectors -- because they are not labor-intensive, and don't require many employees in order to staff a national or international empire.
During the first Gilded Age, the dominant party (Lincoln's GOP) was mainly controlled by the soaring industrial manufacturing sector, the robber barons. Their factories were labor-intensive, requiring loads and loads more workers if they wanted to expand their operations and total profits.
They could have scrambled for existing Americans, and competed against one another by offering higher and higher wages to attract the limited number of them -- but since the industrialists were collectively organized into a quasi-cartel, and had control over the dominant political party, why do that when you can just conspire to open the borders and bring in millions of cheap-labor Europeans to work in those factories?
During the earlier Jacksonian era, the Southern plantation owners brought in millions of African slaves to be cheap foreign labor in their labor-intensive sector (agriculture). But during the Lincoln era, that big picture did not change -- only the source of migration (poor areas of Europe), the particular sector they were indentured into (industrial manufacturing), and the region of the country they flocked to (the industrial North). Thus, inequality and societal instability continued to widen from its already deplorable trend of the Jacksonian era.
This time around, though, the sectors of society who will be in control of the new dominant party, after the Bernie realignment, will be non-labor-intensive -- principally finance, but also info-tech, who control the Democrats. That means they will not necessarily throw open the borders, as the Reaganite GOP has done in order to get cheap labor for their labor-intensive patrons (agriculture and small-business material services, with manufacturing opting for off-shoring as the method of hiring cheap foreign labor).
Sure, tech companies will want some number of high-skilled immigrants from India and China to be coding monkeys, but there still aren't that many people who will ever be employed in the tech sector. It scales up infinitely and cheaply. Taking over a larger share of their market, and generating loads more profits, does not require them to hire loads more workers. Therefore, they have no incentive to truck in millions upon millions of immigrants to serve their own material interests.
Ditto for finance -- they will want a handful of skilled immigrants from around the world to work in Wall Street investment banks, but they hardly employ anybody, and never will. They, too, do not need millions upon millions of immigrants in order to expand their operations and profits.
So, the digital robber barons will not necessarily push for open borders the way that the industrialist robber barons did -- or the Jacksonian plantation owners, or their Koch Brothers descendants of the Reagan era.
The biggest obstacle is the tech titans who get involved in labor-intensive activity. One is Apple, which is more of a manufacturer (of the iPhone and other Mac products). But they have off-shored their plants, and will not be bringing immigrants here, where there are no plants. The other is Amazon, which has an extensive slave army in its distribution business. Amazon's main cash cow, however, is its informational business -- cloud services -- which does not require millions and millions more immigrants to expand, unlike its doodad delivery business.
For improving the lot of the working class, the best-case scenario is for the purely informational tech companies to wield power within their industry -- Facebook, Apple (assuming it does not build plants here), Netflix, Google, and Amazon's cloud but not delivery division. Of course the even more powerful finance sector will stay as highly informational as it already is.
That dominant coalition could be bargained with toward the goal of low immigration in order to boost workers' living standards in labor-intensive sectors, where most people will be working after all. Even giving them lots of skilled code monkeys from India and China would only be bringing in on the order of thousands, rather than millions, of immigrants per year. Give them that, in exchange for no immigration to the labor-intensive sectors -- i.e., all the rest of it. That would harm American IT professionals, but at the benefit of lifting up the entire American working class and much of the middle class.
If they want to leave opposition status, and realign the Democrats into dominant-party status for the first time since the New Deal, the tech and finance sectors will have to offer their leadership as the good elites, as opposed to the bad elites, during a time of soaring populism. Perhaps they get some cheap foreign labor for themselves, but it's still a 99% reduction of total immigration (which does not work as code monkeys or chart analysts).
That appeases both those on the Right who want it stopped for cultural reasons, as well as those on the Left who want it stopped for economic reasons -- and swing / Independent voters who want it stopped for both reasons. And they'll still be bringing in some immigrants, so they can play the reasonable tolerance card as well.