I have friends who are economists, and I get in this argument with them all the time over beers.
There's economic optimization, and social optimization, and those are two different things that are often totally orthagonal.
Economic progress is often horrendously negative for people's lives and livelihoods. People don't just pick-up and move, or re-train in a completely different field with the fluidity that is often indicated, and disruption often destroys lives. This is why income inequality is getting really worrisome, and there's the huge debate over college education costs, and you see so many people now living in their cars because they're chronically under-employed. This is why Trump was pandering to Pennsylvania coal miners and the like. There are millions and millions of people kind of stuck and not sure how to move forward. Everybody in this country can't just be a fullstack web guy, and the alternatives are increasingly working for minimum wage at two jobs, each of which keeps you under 20 hours so they don't have to pay benefits.
That being said, you can't just put the brakes on progress so that people doing things that we don't need anymore are kept happy.
Ideally, we'd have mechanisms in place to help people transition, but we really don't. The best we have is things like the American Reinvestment and Recovery Act, various infrastructure programs (just big employment schemes), and affordable Community College vocational programs. The worst we have are predatory vocational programs that re-train people with useless skills, which are essentially scams to cash in on predatory student loans and GI Bill money.
This is the crux of the 2016 election, and although the virus has hijacked 2020 it probably would have been the crux of that one as well. You have Yang and Sanders proposing massive reforms, AOC with the Green New Deal, contrasted with Trump pushing a regressive approach, and everybody's polarized and yada yada.
Nobody has a good answer yet, or 300 million people wouldn't currently be arguing about it. Ideally we'd have a temporary system of 'engineered inefficiency' in the economy that would help people with legacy skills transition into new fields when employment dried up. But, nobody knows how to politically design, implement, or fund anything like that. So, what we have is this and it sucks.
I hope people smarter than me are working on this problem. I feel horrible about all the folks who have just gotten screwed, and have lost their homes, and are trapped in cycles of poverty. But, I mean, we are debating with strangers on the internet, so you know, no ill will towards anyone even if they disagree.