In Roald Dahl’s Charlie and the Chocolate Factory (the 2005 movie version), Charlie’s father loses his job as a cap-screwer at the toothpaste factory because someone has invented a machine that can secure the caps much faster.
This kind of unemployment is called “technological unemployment” and occurs when developments in technology and working practices cause some workers to lose their jobs.
Without constantly destroying old jobs and creating new jobs through technological innovation, capitalism cannot develop.
But the inevitability of technological unemployment does not mean that unemployed people like Charlie’s father have to be left out in the cold.
Had Charlie’s family lived in a country with a welfare state, they would have received unemployment benefits and subsidized vocational training for Charlie’s father. They would not have had to live in the tiny house or eat a constant diet of cabbage soup (and the occasional chocolate bar).