Defenders of globalization are on solid ground when they criticize President Trump’s threats of punitive tariffs and border walls. The economy can’t flourish without trade and immigrants.

But many of those defenders have their own dubious explanation for the economic disruption that helped to fuel the rise of Mr. Trump.

At a recent global forum in Dubai, Christine Lagarde, head of the International Monetary Fund, said some of the economic pain ascribed to globalization was instead due to the rise of robots taking jobs. In his farewell address in January, President Barack Obama warned that “the next wave of economic dislocations won’t come from overseas. It will come from the relentless pace of automation that makes a lot of good middle-class jobs obsolete.”

Blaming robots, though, while not as dangerous as protectionism and xenophobia, is also a distraction from real problems and real solutions.