I'm not aware that many undertake this challenge as this and many other reasons lead one to leave true O-27 behind go full O gauge with the O22 style switches or go more for 3 rail scale setups. At most, some persistent users will upgrade their O-27 to constant voltage, but it is a bit of effort.
The only thing I am aware that approaches your ask, but it is far from a tried and true methodology, is what was teased here: https://ogrforum.ogaugerr.com/...l-light-modification