That has been the case since industrialization. It's not exactly new that capitalists want to replace workers with machines. The question is whether there will be new and different jobs for people or if AI and robots will take over everything this time. If that's the case, capitalism will break (nobody can afford to buy the products anymore) and a new economic system will emerge. This could be a great system for everybody or a dystopian one. My bet is on dystopian until there will possibly be a violent revolution by the peasants.