The Luddites didn't predict this or anything like it. They predicted that the rise of automated textile production was bad news for textile workers. In this, they proved entirely correct, although their response to that prediction was regrettable.
The thesis that automation will soon be good enough to replace enough of human labor that it's a problem for capitalist economics is quite new. During my lifetime, the common refrain has been that that automation would replace low skill workers and people will need a better education in response. This was fairly true for the mid-20th century, although not so true for the early industrial age.
This prescription doesn't seem all that reliable in the face of automation that is aimed at skilled knowledge work, which is a booming development area today. Indeed, there is considerable reason to think that middle class workers will be facing more of a headwind from automation than low skill workers in the coming few decades.
Basically, the rise of artificial intelligence is going to create absolutely stupendous amounts of wealth, but it strikes me as unlikely that wealth will accrue to the middle class absent major policy changes. Let me recommend a book on the topic of what to do next: