I hope it's not beating a dead horse to reiterate this point.The answer is robot to ASSIST, not to do everything.
I used to do a factory job that did, in fact, have a "robot" counterpart doing the job at a different plant for the same company. When I first learned that my job had already been automated, I was worried that I'd have to learn to code soon. Almost immediately after that thought my colleague went on to say that the machine doing that task was so high maintenance that it could only churn out a few orders a day, whereas I was churning out a few orders every hour. People who say that robots are imminent and will immediately displace 10s of millions of workers all at once are tacitly admitting they've never worked in a factory before.