It's to modify railway signal lamps to use LEDs instead of filament bulbs. The bulbs, each has 2 filaments / 3 contacts, take over an amp at 12V and are very expensive things and don't last that long. The trouble here is, with a filament bulb we simply use a relay to determine if it is dead, switch to the second filament and raise an alarm. We need to replicate this for the LED - not to switch to a backup LED but to drop a relay. What is supposed to happen then is all the further signals go to danger, and that bit is easy. These signal lamps are somewhat ancient and will not take the 'real railway' drop-in replacement LED units and anyway we could never afford them.
Ah, now this is something to work with.
These would be outdoors, then?
It should be possible to arrange a photodiode (no one uses LDRs anymore, they're old, bad, and non-RoHS) to sense some of the optical output, close enough that the intensity of the LED chip(s) overwhelms almost any possible interference. Interference would have to be fairly extreme I think; a white LED these days is typically about as luminous as the sun(!), so any interference would have to be much more intense: a very close welding arc perhaps; lightning strike; or highly focused light (think: Archimedes death ray).
As long as the diode senses light of sufficient intensity, turn on a MOSFET to switch a shunt resistor onto the circuit. This replicates the incandescent's current draw.
At such intensities, the PD probably looks more like a small resistance than a diode. Or use it photovoltaically, i.e. apply a load resistor and sense the voltage. Maybe use two PDs in series so it can bias a BJT on (instead of using a MOSFET). (Some Schmitt trigger action may still be desirable for clean switching, or the switching transistor can be heatsinked to handle the dissipation during indeterminate levels.)
Note that this solution necessarily negates the LED's efficiency; only reliability is affected. (And maybe not all that much, if the resistor can't be placed somewhere away from the LEDs.)
This also assumes the LEDs aren't dimmed by variable AC or DC. (PWM is OK.)
If changing the sense relays is an option, then I would simply suggest using the LEDs as-is.
Also mind that transients can fry LEDs easily; a TVS diode may be handy as well. Just a little SMAJxx something should be fine. How important this is, depends on where we're talking. If this is like trackside infrastructure, I would anticipate lightning induced transients, and maybe use a bigger TVS. If this is on rolling stock, ESD or smaller surges are a more likely threat, which may not need much if any additional hardware; but beware if alternator load dump is required by the customer (in which case a voltage limiter circuit is probably adequate).
Tim