The thumb has to be very thick indeed. The advantage of district heating is really the worry-free aspect.
With the heat pump, a lot would have to go wrong for there to be financial parity. I rather see a small car being financed permanently. With slightly higher house consumption than assumed, the calculation diverges even more.
On top of that, heat pumps are eligible for subsidies, and there are currently grants even for replacements. This probably does not apply to district heating.