Despite the name it’s not a simple on/off that can be done with a relay. Those 2 wires also provide power to the thermostat unit. I’d first try to find more information about how these thermostats report demand to the boiler before using a relay.
I’ve also seen someone that simply replaced the NTC/PTC on their existing thermostat with some ESP circuit so they basically controlled what the thermostat “sees”. Want more heat? Tell the thermostat that it’s 5℃ in the room. Want the boiler to stop? Simulate a cozy 30℃.

