No. of Recommendations: 3
Sci Fi did this long ago.
Sort of. I can't recall one that predicts people being replaced by robots, and then there is massive poverty and riots. Usually it is utopian (i.e. people living in luxury), and then the robots/AI go bad in some manner. But maybe I didn't see/read whatever you're thinking of (or maybe I just forgot...I do that a lot).
Up until now, automation has largely been a positive. It makes people more efficient, and -so far- new jobs are created at least as fast as old jobs are obsoleted. With AI, that probably won't happen. Not that it will replace everything. I suspect it will provide augmentation such that one person could do the work that was done by 5 or more, including doctors and lawyers and engineers (which have largely been spared from job loss as technology has advanced).
Most sci-fi I'm familiar with have future automation, but usually there is the haves and have-nots, and the dystopia springs from that societal inequity. Sometimes exacerbated by overpopulation (e.g. Soylent Green).