Angela Merkel had a bad 2018. Outsiders heard the word “migrants” during her party’s many electoral defeats. But a more urgent concern for millions of German voters was the fate of diesel cars they bought because they were told it was good for climate change.

In May, Hamburg became the first city to ban all but the most recent diesel models from its downtown. Well, parts of its downtown anyway—those parts suspiciously close to air-quality monitoring stations.

Other...