I did a similar thing many years ago to limit HW temperature and waste of energy on a gravity HW system. A Honeywell valve was inserted in the gravity return to the boiler, near the boiler, and controlled by a cylinder stat. The auxiliary switch on the valve was used so as to interlock the boiler firing thus saving energy. As already emphasised make sure the feed/vent route is not compromised by the valve. I also fitted a pump to the gravity circuit later to improve recovery time after the morning rush in our household. Sorry, I can't remember the wiring details now but no relays were involved just the valve aux switches iirc.