As a test, using null objects and “has been rendered recently” node I was able to turn the lights off when they go behind the planet.
This works when I am zoomed away from the planet and look it from a distance, the lights that are behind it blend out nicely (via timelines) and dont cause issues. Smooth.
Problems occur when I zoom in to the close distance, so that whole camera is filled with terrain, then all nulls are not in vision thus all lights go off, even though the lights at the same side of the planet as the camera should be still casting light, they dont since they are behind the camera.
Hmm back to the think-tank!