That’s true, but still doesn’t always make heat pumps the most cost effective choice to operate. For example, last winter I paid an average of $0.24/kWh for electricity vs $0.05/kWh for natural gas. Even if a heat pump had a perfect 4.0 COP all winter, gas would be ~15% cheaper. Electricity prices really need to come down before it will be viable for everyone.
This varies quite a bit based on location for instance here in Florida natural gas is $0.13/kWh while electricity is about $0.12/kWh, also where I live there is no piped NG so it would be propane delivered to a storage tank which is even more expensive.
Also the winters are mild here so basically everyone has either a heat pump or the further south you go it's just heat strips because heat is rarely used so not worth the cost.
So any kind of blanket statement about heat pumps vs gas heat would be folly, but due to improvements in cold weather heat pumps and solar power are allowing them to make much more sense in more places.
There are many advantages to decoupling fuel combustion from its energy use, burning NG at a power plant relatively efficiently with much better emission controls, then distributing on electric grid for use more than just heating, while allowing the home to heat from many different energy sources and allow for grid down backup as well.
Does your 0.05/kWh include the distribution costs? The thing to do once you go to heating with gas is to just switch completely to electricity and turn off gas. In my experience (admittedly not in the US, but several other countries) distribution cost often more than double the $/kWh for natural gas (especially if you only heat part of the year).
Not to mention, lots of places have time of use electricity pricing which makes it even worse. This is the problem with running my heatpump when its cold, some of the coldest times (right before dawn) coincide with peak time-of-use prices
I’ve tried. For it to be at all viable on my property, I’d need to cut down a bunch of trees. I’d rather keep the trees and pay someone else with solar panels.
I mean, in many countries, often either the government or a company closely allied to the government has been granted a legal monopoly on selling electrical energy, so buying electricity from other people is illegal.