You assume a 2-port device, like a power supply charging a battery through a resistor.
In my case of a 150 VDC supply charging a battery through a resistor, the battery gets all its current from the supply and the resistor gets hot. But if you add a buck switcher, the battery gets most of its current from ground. Supply current can be about 20% of battery current.
Electronics is wonderful, because we can get nearly ideal parts, and our buck switcher can work against true 0-volt ground. A heat pump uses less than ideal parts and can't work against absolute zero, but it's still a lot better than having a conductive path from a high temp source to a low temp load.
The biggest part of a steam turbine system is the condenser, the 3rd port heat dump, the switcher's ground. That's the big reason we don't have steam powered cars.