If the link was optional, so they could either share heat movement or discard waste heat, then there’d be plenty of room for an algorithm to sort it out.
But if the link is optional (i.e. no storage), it's unlikely the timing works out often enough to justify the increased complexity or cost. (E.g. if the time overlap of water heating AND fridge cooling is 25% (which seems pretty high to me), you'd only get that percentage of the energy savings.
Maybe you can pipe all your heat and cold to central locations and have some kind of heat broker. There’s also a lot of heat in your attic.
perhaps maybe in a large tank of a thermally dense fluid.