@TRS-80 I have similar thoughts for a controller for my heater (hot water radiators with an oil boiler and 4 zones).
For 1 and 2, I realized I could wire my node into the zone controller. It has a common, so I can derive the node power from the controller. Since it works over radio, it doesn't have to be where the old thermostat was. I have temperature sensors in all the rooms.
The node controls 4 solid state relays that are wired in parallel with the existing zone thermostats. That helps with 5. The idea was to set the conventional thermostats at a low value. Then if my node failed, at least the old thermostats would kick the heater on before the pipes started to freeze. Also as a fail safe, if the node has the heat on and doesn't hear from the controller periodically, it will shut off. Still working on that part.
As for controlling it, there is a domoticz plug in here: https://www.domoticz.com/wiki/Plugins/Smart_Virtual_Thermostat.html
It only works for heat, but the underlying code is pretty straight forward, and it lets you average sensors. There might be something there you can adopt. I ran it with a MySensors modified space heater all last winter and it worked well.
Unfortunately, something kept killing the radio on my node, maybe a spike from zone controller relays. I haven't sorted it out yet, so the heater thermostat remains a work in progress.