Then it's just a matter of capturing the remote codes and setting up a way to remotely command a given Pi to send that pattern of pulses out of its IR emitter.
edit: I just did a quick search and Sparkfun sell WiFi IR blaster boards for $20. I'd imagine you could find cheaper ones on Aliexpress or other places where you typically find cheap electronics. This would probably be simpler to set up versus a Pi with less things to break since it's not booting a "full" general purpose OS.