But not your pool pump. If you have an old pool pump then you should definitely consider replacing it with a modern one as they function better, more reliably, and use far less energy.
with a home, thats not universally true, if its pooorly insulated for example. trolleys, sure, they are all electric, so you can go down to zero emissions if you use green energy sources. Producing them though, metal production still runs with coal today just like in the 19th century
Even if your home is poorly insulated it would take a long time to recoup the (direct and indirect resource) costs of a new home with better insulation.
Taking into account future discounting, it's probably almost never a good idea.