Heatpumps can be powered by natgas as well. Heat pumps are just a compressor and a heating element for a defrost cycle. Gas powered compressors are relatively common, e.g. in camping trailer refrigerators.
Also, even with Germany's relatively expensive electricity, heat pumps are economical after 15-20 years, which is good enough.