The day is coming, experts tell us, when artificial intelligence and robotics will massively disrupt the labor market. Autonomous vehicles will put 3.5 million truck drivers at risk of losing their jobs. Checkout machines may replace 3.4 million retail cashiers. That is only the beginning of the long list of jobs that will be destroyed by technological change.

The shift will not happen all at once, and most of the people who lose their jobs will eventually find new employment. The benefits of automation will include lower...