I've always been a fan of speculative fiction, and in particular the sub-genre of cyberpunk and what is often now called dark space opera (which usually has cyberpunk aspects).
As most people have become aware over the past few decades, good science fiction explores possible futures that come about due to technological advancements. The focus is usually on the changes to society or mankind, with the technology being just a driver for the change. If you weren't aware that this is the core of good SF, then I'm happy to let you know that you should be reading this sort of fiction because it will help you be more prepared for changes as they occur.
Among the key themes inherent in most of these speculative futures is the idea of automation. That computers, robots, and machines will automate away some (or nearly all) jobs that humans have done in the past, or that they do today. A couple decades ago this was true fiction; today we can see that this is an almost unavoidable future.
Personally I find this interesting because my entire career has been in the software industry. Most software is all about automating away people's jobs. Not that we usually frame it that way, but the reality is that corporations used to have massive numbers of accountants, now they have a small handful because computers do the work of those many, many thousands of accountants from the past. And software drives robotics, and machines, and all kinds of automation. My career is all about driving toward a future of automation, and so I tend to think about what that means for society.
For example, I was just reading that driverless cars will eliminate over 200 categories of jobs. We already know that nearly any factory work can be automated, it is just a matter of whether the automation is cheaper than offshore labor. There's essentially no way US labor can be cheap enough to avoid the work from being automated, so bringing jobs back from offshore is entirely unrealistic.
This article from a Nobel economist sums up how robotics threatens jobs rather nicely. And explains why worries about outsourcing jobs, or thoughts of trying to "bring them back" are not really important.
Capitalism and the free market drive companies to find the lowest cost way to provide the minimum viable product that makes the most profit. That's brutal, but it is true. Current US and European trends toward right-wing thinking tend to focus a lot on removing barriers so corporations can better pursue capitalistic and free market policies.
So companies will either find super-cheap labor somewhere in the world, or if that's too hard or expensive then they'll automate those tasks so they don't require large numbers of humans at all. Whatever costs less in the long run will win, and that will not involve human labor.
Assuming we're going to stick with capitalism, corporatism, and free market concepts (and I think that's a safe bet), the question isn't whether most people on the planet will become unemployed. The question is how humanity and society will deal with most people being unemployed.
One common trope in speculative fiction, and in reality, is the idea of a basic income provided for unemployable people. This article against universal basic income (make sure to click through to the author's original article with details) makes some good points about the risks of a basic income. Sadly, even after you read the author's original (and often good) points, I think it is clear that he maintains unrealistic hopes about keeping most people employed in some manner.
I don't have the answer. I don't know what society does look like when factories that required thousands of workers now require a few hundred technicians to keep the machines running.
Can we retrain those thousands of unemployed piece workers for another factory? And what stops that other factory from becoming automated? When that happens, do we retrain those people for jobs that can't be automated? What jobs are those?
We already see that fast food, driving vehicles, factory work, warehouse work - these are all on the chopping block. That's hundreds of millions of jobs headed for automation. What other economic segment has demand for a few hundred million generally unskilled workers?
In India I'm told that they intentionally avoid the use of big machines for construction, preferring instead to bring in hundreds of people with shovels and picks. I don't know if this saves money, but it keeps people busy and helps preserve social order (note that I have nothing to back up this idea - I'm going on second-hand knowledge here).
After the US Great Depression the government came up with a lot of busywork projects to keep people busy. Not bad projects either, in my youth there were a lot of highway rest stops and other small projects that had been built by the CCC. Those have mostly been replaced now by more modern facilities created via much lower labor modern technologies and techniques. But perhaps we need to return to building public works using rustic hand-laid stonework?
My point is this: whether we go with something like a basic minimum income, or use legal structures to try and block the free market from optimizing away our jobs, or something else, we absolutely need to come up with some societal answer for what we'll do when the majority of humanity is unemployed.