Caterpillar topped third-quarter profit and revenue estimates on Wednesday as a boom in AI technologies drove demand for its energy equipment, sending its shares up 12%.