Should there also be a small value resistor connected between the capacitor and the photo-relay to limit the current to the 1.5A maximum specified in the datasheet?
Maybe they are depending on the internal lresistance of the MOSFET?
But yes, adding a resistor would be prudent (and a bypass diode for when the capacitor is discharging its energy back to the decoder). I think that the photo-relay should be installed in the resistor branch of the Keep-Alive resistor/diode circuit.
Actually, since the photo-relay will be conducting while the decoder is not being programmed, the relay can be installed in series with the resistor/diode combo.
I still think that adding a coil is much less complicated, and many reported that it works for them.