

The trick is to realise that even if you could build it perfectly, your requirements will change causing even what was perfect before, to be less than perfect now. Of course it was never perfect, only an approximation. Sometimes you rip something out to rebuild, and sometimes you build something better, and leave the crappy setup behind.
At the point where you feel like everything is a massive bowl of unmaintainable spaghetti, you unlock construction bots, and can start to rebuild and redesign your factory on a massive scale, striving for perfection, but always coming up just slightly short, ripe for yet another redesign.
All of this is exactly the same when programming.
Yeah, depending on the heatpump, the outdoor temperature, and the target temperature, a heatpump can reach up to 5.5x heat output. That means for every 1 kWh of electricity you use to run the pump, the pump will output 5.5 kWh of heat energy.