You factor the present into the future, electricity price, gas price, CO2 penalty payments - compensations, durability and prices of the systems. I see an error tolerance of +/-30% there, because of the future and political decisions. I can easily calculate the result to fit my goal
So if I understand your post correctly, this is about possible costs in EUR. Ok, then I come to the conclusion that I save 19,000 euros today (20k - 1k for the CO2 compensation) and then have to buy expensive gas in the future instead of cheaper (possibly even self-generated) electricity. That's true, but 19,000 euros seems generous to me.
And actually, it was not about really wanting to save EUR, but that gas heating currently has such a bad CO2 reputation. My claim is that the CO2 footprint can be (over)compensated - and clearly so in this calculation. If that is actually wrong, then the discussion makes no sense. But I don't believe that.