I'd say using a relay would be fine - you will get a flash/gitter because the monitor will have to resync to the slightly different framerate, but that really shouldn't cause any damage at all.
At the end of the day, it's not that different from just using a physical switch to swap over the composite inputs.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'd say using a relay would be fine - you will get a flash/gitter because the monitor will have to resync to the slightly different framerate, but that really shouldn't cause any damage at all.
At the end of the day, it's not that different from just using a physical switch to swap over the composite inputs.