Tbh, making the tradfri remote working with HA is kinda simple: Get a zigbee USB stick like deconz or a preflashed one for use with zigbee2mqtt like this https://www.amazon.de/dp/B07ZZ88BWZ/ref=cm_sw_r_cp_apa_fabc_HZR3Fb94C44TN?_encoding=UTF8&psc=1and plug it into your ha host. Then setup the zha integration from ha settings and search for new devices, then get the remote into pairing mode. Then you can use button presses on it as trigger for automations by using as trigger device->tradfri remote->the button you want to use.
I’m using it like this and so far it’s stable and fast. Of course can make a circuit like a relay with it’s coil connected to your wall switch and pull an esp pin high or low, but that will require some harder tasks and an electrician to properly install it. There are also smart switches like lutron casetta to replace the normal wall switches, but they’re a bit expensive and I personally don’t like their looks. I’ve seen a few showcases from a YouTuber called smarthome solver, that’s a source for a few recommendations.