Mirror GPIO input signal to another GPIO output

It is what you asked for though:

Share your ESPHome config for the device. I do asimilar thing for my Projector RS232 remote: Serial Projector control with ESPHome