If you are a government intent on keeping population away from armed revolts replacing 1 million jobs with 1 million robots is not a smart solution especially not in a situation where large parts of your country are starving and those jobs fed 3 million people in some remote corner of the country (the ratio is probably much much higher). So you save some money.. but you have 4 million very unhappy people hating your guts now. (not you, I mean the company ,p)
Obviously automation is more efficient (and there is no job that can't be automated, automating any and all human-service jobs is what the current robotics research is all about after all. When a robot is made that can go shopping, make me a sandwich, climb stairs and make a coffee then it can be programmed to repair other robots and maintain factories.
At that point, programmers would be the lowest part of the food chain. And paid fittingly... until an AGI is developed that can write dynamic routines for robots. And once each service robot has an AGI that can decide how to do things the most efficient way, programmers as the last bastion will be unemployed.
Ah the dystopian future versions are always the most fun