For me you can draw a pretty clear distinction between an intervention that the local pre-warp population would never even know about (such as nudging a comet) and what Nikolai Rozhenko did in Homeward or Data did in Pen Pals. In both of those cases the locals may have had their cultural development influenced by the intervention, in particular becoming awar of alien life or the impact on their culture of having their stars and geography change by being moved to another planet.
In Pen Pals, Picard was still able to quietly intervene to help with the planet's geological problems.
Even the Pen Pals case might not be undetectable. It's possible that their geologists in the future could figure out that the dilithium had been shattered and it could only have been done by an artificial outside force.
The issue with redirecting natural phenomena is that if the planet is advanced enough to notice the change (but didn't see you,), then you have either performed miracle, which will influence their religion, or you have screwed up the data on their scientific measurements, which could set back their discovery of physics. And if it doesn't then they will realize there was an outside intelligence at work.
So basically it's only possible to redirect a comet without it being discovered if the planet hasn't started recording precision data on stellar phenomenon yet.