The Prime Directive was intended as a principle of non-interference. When TNG came out we were coming out of the cold war and only two decades removed from Vietnam, it was meant as a principle not to force the Federation's ideals onto other cultures and cause another Vietnam.
In Pen Pals, I believe the writers misinterpreted it as a directive not to save entire civilizations from natural disasters based on the specious logic that one of them might become the next Hitler.
If you think about it, if you interpret it that way it's actually a statement that any warp-capable species are more important than non warp-capable species.
Suppose you live on a developing world. A big meteor comes and strikes your planet one year before it would have discovered warp. Your civilization is destroyed. Now suppose that same big meteor came out year after it discovered warp. Now the Federation comes and saves you. What's the difference in those two years? The only reason first contact is initiated at that point is that it's the point they're going to meet other species anyway. So why is one a violation of the prime directive and not the other, because one knows you exist to ask you for help and the other does not? That's a pretty awful philosophy if you ask me. It's pretty abhorrent to ignore the deaths of billions of people solely on the grounds of your butterfly effect anxiety.
I also think the 'Holocaust' case should not violate the prime directive. If an entire race is being systematically murdered or enslaved for no reason, they will never have the choice whether or not to accept Federation beliefs.