Addressing the question in the title, "What happens if an entire class of workers loses faith in their careers", look at what happened to printers. That was a good skilled trade for centuries. Then it just went away. Phototypesetting took the high volume end. Desktop publishing took the low end. Computer-controlled presses took press operators. And then the newspaper business died. I've heard homeless former printers…
I find this comparison to printers arbitrary, precious, and specious. Aren’t the armies of software engineers in tech more akin to the line-level autoworkers than artisans? The numbers would certainly suggest so. But it’s also silly to pretend such a new profession is anything akin to a generations-old trade. But maybe those tradesmen aren’t such victims either in this context? How privileged to be able to pass your profession down to the next generation! No one in my family has had that since farming, when only the oldest benefited.