As a teenager I read Kurt Vonnegut's novel Player Piano. It's stuck in my economist's mind ever since. It describes life in the near-future when technology and machines have destroyed the demand for nearly all human labour, except for the labour of a small, highly-educated minority. The vast majority of the population would be unemployed, but for government make-work projects.
The book was published in 1952, so Vonnegut's near-future is our recent past. It didn't happen. But could it happen?
You can try to answer that question by playing with production functions; seeing if a change in technology might shift the production function upwards and yet lower the marginal product of labour, and hence the demand for labour, recognising that the supply of capital goods is endogenous, and will itself respond to the improvement in technology, and that might have an indirect effect on the marginal product of labour, in an intertemporal general equilibrium model....
Or you can think about horses.
When horse-power became cheaper than human-power, horse labour replaced human labour. When steam-power in turn became cheaper than horse-power, horses in turn became replaced. The demand for horse labour rose, then fell. If the population of horses had kept growing at the same rate as the population of humans, most horses now would be redundant, with just a small elite minority of horses employed in very special jobs. Improving technology did in fact drastically reduce the demand for horse labour. If Kurt Vonnegut's novel had been about horses, it would have been a historical novel, not science fiction.
It happened to horses; why couldn't it happen to humans?
It's true that humans own the means of production (including their own labour, and horses' labour), and horses don't. That's important, because humans will therefore (at least in aggregate) reap the increased income from any increased output, even if human labour no longer has value. But for a human who owns only his own labour, that is little consolation.
New technology destroyed the demand for the labour of horses. There is nothing that makes it impossible for new technology to destroy the demand for the labour of humans. It hasn't happened yet, but it might. What's surprising, or what ought to surprise us, is that it hasn't happened yet.
You can use horses to pull things, but not a lot else. When the demand for horses was at its height, it was mostly a demand for horses to pull things. You can use humans to pull things too, and you would use whichever is cheaper: horses or humans. But humans can do a lot of other things too. When horses destroyed the demand for human tractors, humans switched to other jobs. When steam and diesel tractors destroyed the demand for horse tractors, horses became redundant. They couldn't switch to other jobs. Horses are just too specialised.
The only reason I can think of why Kurt Vonnegut's novel never came true, why human labour didn't go the same way as horse labour, is this: humans are a lot more versatile than horses.
Will human versatility always be enough to dodge and weave around all possible changes in technology, forever? I doubt it. Forever is a long time.