Listen to political debates these days, and when it comes to the economy, it doesn’t take long to identify the enemy: It’s the robots. In speech after speech, politicians are both tapping into—and feeding—the growing fear that automation is out to take away jobs. And something has to be done to stop them.

For many politicians, that “something” involves raising the price of automation, perhaps by taxing each robot or demanding that companies find jobs elsewhere for workers displaced by automation.

Politically,...