Thanks! I actually have these already, I didn't even think they could be automated though. What do you use as the transmitter (I'm assuming you don't have a robot arm pressing the button on the remote ;))?
A decade ago, I soldered a relay directly on the remote to achieve this. It looked terrible with wires hanging out, but it still worked reliably.
Now I just use cheap rf emitters from amazon (you may have to solder an antenna to increase range). As soon as I got an AppleTV, all my switches became available outside my LAN, thanks to Apple Home without having to worry about security.