Excuse my poor explanation. I do not recall what is the MCU on the thermostat board. This may help.
NOW : Buttons --> Thermostat's Board MCU
PLAN : External MCU (ESP8266) --> Unknown Circuitry --> Wires in parallel to the buttons --> Buttons --> Thermostat's Board MCU
That way the ESP8266 would be able to get a command over the network to "press" the buttons.
I want to simulate a button press while having the original buttons in parallel for offline control.
I hope this clears things up a bit.
OK, I get it. First make sure of the polarity of the buttons as they are now. Most likely, as possum noted, there is a pullup somewhere (either on the MCU or a resistor on the board), and the button is NO. If that is the case, it looks to me that you can configure the GPIO as input (high impedance) or output. Therefore, when you want to activate a button, configure the pin as an output and drive a 0. Then, to release the button, reconfigure the pin as a high-impedance input.
I have never used the ESP8266, but looking at the datasheet(s), it appears that you can do this.