Growth always means pain in the near term. It is as monotonously predictable as gravity.
Who would have thought in the days of buggy whip making that job titles in the future might be
optimization engineers
coders
statistician
machine learning specialist
maintenance specialists
technical personnel
Automation absolutely wiped out jobs in agriculture. But it led to (today's market price) corn being around $6/bushel. An actual bushel of corn is 56# (I'll spare the boring ag part why it isn't necessarily 56#, but close enough for the purpose of this discussion).
Compare the price of corn to the foodstuffs that are WAY, WAY more expensive. There is no way you're ever getting a bushel's worth of broccoli or peaches or bananas for $6. And the reason is because there's no way to automate away one of the most crucial functions of those commodities - harvesting them.
Almost every job function in existence today owes itself to a very long string of technological advances and automation that were inconceivable a century ago. Few of the jobs which existed a century ago still exist today. And thank God for that. If ag hadn't been heavily automated, we'd still have around 90% of our population directly involved in it in some way, which would mean far fewer doctors, engineers, coders, rough necks, directional drillers, welders, electricians, pilots, et al.
I'm now 56 and have re-tooled 4X in my life. I'd hate to have to do that again, but I know I could if I needed to. Most people can, they just have to decide to get it done if life makes it a necessity.