Caterpillar’s power and energy division topped $8.2 billion in the second quarter, while a growing backlog and stronger profitability lifted expectations for the stock.