When it comes to oil demand, the conventional wisdom is clear: Population growth and a rising global middle class guarantee that demand—and prices—will rise over the coming decades. It is a story line that is almost universally accepted by investors, governments and industry alike.

But like many such consensus views, it is one that should be treated with caution.

The...