A light barrier requires a lamp (or a white LED) and a phototransistor. Would it be possible to combine both in a single element?
The answer is the proximity sensor, which combines an infrared LED with an infrared phototransistor.
The 1st attempt didn't work, because direct sunlight blurred the sensor.
So I added a protection and following attempts were all successful.
Even direct spotlight didn't alter the sensor.
Provided some protection from direct spotlight or sunlight, the sensor is capable.
Combining multiple sensors, eg. 4 of them, could provide a highly accurate and sophisticated trace reader.
Proximity sensor key benefits are: