Firms including KKR & Co., Blackstone Inc. and Brookfield Corp. are piling billions of dollars into companies and technologies that help reduce the vast amount of energy that goes wasted on assembly lines, in office buildings and even on farms.