If so, an esp32 or esp8266 running esphome and an ir led connected to a pin might be a solution.
Would cost like 3 dollars in parts from AliExpress, and you could connect it to home assistant or node red for more control or automation.
You could also add a temp sensor like for example ds18b20, which are also pretty cheap, if you want to be able to read temperature remotely or automate based on temp
What’s the thermostat controlling? How is it wired up? I replaced mine with ram esphome with a temp sensor and a relay that bridges the pins when it wants to turn on. Mine is connected to home assistant but i think you can use esphome devices stand alone.
This is probably not a useful answer, but it's the level of knowledge that I have: it controls the heating and cooling, and it just gets pushed into the holder on the wall.