What about the factory to build the robots.
What about robot repair and maintenance?
Whenever a task is automated with robots, jobs are created throughout the world to make this possible.
1. Design the robots
2. Build parts for the robots.
3. Improve the robots
4. Repair the robots
5. Paint (rust proof) the robots
6. Non-repair maintenance (grease gears, test quality, etc.)
7. Write code to interface with the robots
8. Document the robots (both the robots and the code API)
9. Market the robots
10. Sell the robots
11. Litigate all the robot related issues: patents, job loss, parts and price gouging, new laws, etc...
12. Build robots to build the robots (go back to #1)
Now, le'ts add to those jobs more jobs created when some of those who were laid off who start a new business.
After a significant innovation, the job market shifts labor forces from one place to another. It can take a few years but shifting jobs, not long-term job loss, is what happens.
It is usually only in the short term that job loss happens.