Yes you can do that, and some companies actually go a step further and pay for the upgrades themselves and become like a pseudo-utility (See ESCO's: https://en.wikipedia.org/wiki/Energy_service_company) where people pay them what they were paying, and the company reaps the benefits of the savings,
but it actually gets really complex. Energy prices rise, and the clients needs change, they might sell their building, (who actually owns the equipment?) and it doesn't necessarily create correct incentives. It also delays payment by minimum a year, and it's a lot of additional hassle. (How do you handle disputes for unusual situations like them buying new equipment they didn't tell you about, etc. etc.)