@diamantmatch
It was just the optocoupler approach to control 12V dc from arduino that caught my attention. It's enough with a simple transistor driver to control it. And yes, always have a diode in reverse across the relay coil.
If it's 12V relays, you probably already use the same 12V supply to power both relays, and the arduino (maybe with a voltage regulator for providing 5V to the arduino from the 12V rail), and then the optocoupler approach is defeated, as they have a common ground.