You're leaving out a few steps.
The invention of the steam engine (along with the new capitalist mindset that controlled the government and allowed the closing of the commons putting a lot of farmers on the street) created 70 years of chronic underemployment, where if you were lucky, you could be a servant or similar and totally at the mercy of your boss. This was limited to a large degree by the expansion into the new world through both voluntary and forced immigration and homesteading and such in the new world.
The invention of electricity through to the invention of electronics corresponded with a massive reduction in the labour force. The captains of industry suddenly agreed to the child labour laws and society stepped in with schools and the youngest spent ten years (now closer to 20) getting educated instead of being in the workforce. Then to avoid social unrest (and due to many studies that showed people were most productive when putting in shorter days/weeks) the workweek was reduced and reduced again. Retirement also became a thing, along with more support for the disabled.
There were also 2 large wars that brought high employment basically breaking and fixing windows. Once those wars were over, some countries such as the USA benefited due to still having infrastructure and had lots of well paying work. Other countries still haven't recovered.
I'm sure there's more I'm missing and sometimes (often?) automation has raised the wealth of most leading to more jobs, though lately we seem to be going away from that. The last 30 odd years seem to have been stories about good jobs ending, to be replaced by crappier paying jobs, usually in the service industry.