Automating gas fireplace and heated floor

hey friends,
I have a question about, what I think is essentially, replacing thermostats. We’re in a new house that has a gas fireplace controlled by a very simple thermostat on the wall. As near as I can tell, that thermostat reads the temp of the room and if the room is colder than the set temp it closes a relay that turns the fire place on.

Could I replace that with a temperature sensor (like a zigbee or smartthings sensor) and some kind of low voltage relay? If so, what’s the preferred low voltage relay for HA?

Similarly, we have a heated floor in the master bath - it’s also controlled by a very simple thermostat. I know there are smart thermostat replacements for this particular band, but isn’t it also just a sensor and relay?