If Input is above specific Voltage than only get output
Your idea should work but I feel more inclined to suggest a different approach...

Extract what voltage you can using a 3 phase bridge rectifier and use a powerful buck/boost regulator that can deliver a DC voltage suitable for lighting ONLY the lights. This might mean a re-wire for just the lighting circuits because there is no way this would work with a lot of old fashioned equipment that use step down transformers.

With your idea I would be worried that in the time it takes to decide if the voltage needs stepping down to a lower level, the light bulbs would be severely compromized in lifespan.