They dealt with it.. Star Trek for example, has abolished capitalism in the federation and only use money for trade with others or independent colonies.

As you no doubt can guess, there is no job on this planet that a robot of sufficient tech can't do. The question is not when that happens, it is already happening, and the only reason there are still people in steel works, car manufacture or really any other job, is that politics represses the robotization of these jobs but that can't work forever.

What you ask has a logical answer. Capitalism or consumerism needs to stop existing. Robotization is the end-game of capitalism. Once all humans are out of production there are none humans left who can consume. Service jobs DEPEND on people having money from work. With no one working in lower jobs, service jobs stop being profitable = robots take them over too.

And yes, for a while robots need to be built by humans... until that too is automated. They need maintenance... until that too is automated.

Result: Either capitalism ceases, or the western world will learn the true meaning of poverty.