This piece by Derek Thompson that came out in The Atlantic, is a long, but very worthwhile read. It came out in 2015 and I think speaks to the angst that drove support for both Bernie Sanders and Donald Trump.
So an important takeaway is that instead of scapegoating immigrants, we need to take an unblinking look at what has truly been an elimination of jobs largely due to automation.
"The U.S. labor force has been shaped by millennia of technological progress. Agricultural technology birthed the farming industry, the industrial revolution moved people into factories, and then globalization and automation moved them back out, giving rise to a nation of services. But throughout these reshufflings, the total number of jobs has always increased. What may be looming is something different: an era of technological unemployment, in which computer scientists and software engineers essentially invent us out of work, and the total number of jobs declines steadily and permanently."