The operating costs could develop evenly. But how long will the pump last without expensive repairs? The gas boiler runs almost maintenance-free for around 15 years, Karsten
Heat pumps are initially low-maintenance to maintenance-free and also do not require a chimney sweep.
Durability is a crystal ball. When replacement is due, the gas boiler is cheaper in terms of investment (if still allowed then, see oil).
Consumption costs are written in the stars. Gas prices can regularly double from one year to the next; we are currently experiencing a price low. 40€ sounds nice, but it can also easily become 80 or 100. Electricity prices are rather stable or gradually rising, as they are significantly less influenced by speculation and international political mood; moreover, the energy source is interchangeable up to self-generation.
But of course, this is based on the past; the future is unknown.
If gas, then so that it can be replaced by the next investment cycle. Who knows if the burners will still be allowed forever; the Energy Saving Ordinance already penalizes this system. For heat pumps, I would immediately think of ground source; with subsidies, it may not be more expensive than an air-water heat pump.
Anyone who has a general contractor who wants >10,000€ extra simply for the presence of a heat pump effectively has no choice. The offer could also say, "Dear cash cow, not available from me, you take gas and that's final. Best regards." Long live architect-built housing.