It would be perfectly understandable for viewers of children's television to labor under the delusion that because a show is meant for children, the material presented will be relatively tame. But nothing could be further from the truth.
Kids are tough little buggers, and they can handle much darker and more complex material than we often give them credit for. That said, there is a limit to what every small child can handle, and there are examples from so many different shows where the writers went a little too far and ended up creating some genuinely scary content.
What tends to be the most upsetting is when this kind of stuff ends up in a show that isn't exactly known for causing existential crises in children, and then all of a sudden it pops in with a truly horrifying visual (Rugrats has a bunch of examples of these) or a storyline that makes you uncomfortable in a way that you aren't quite emotionally capable of processing yet because you are after all still a tiny human. The scars that these seemingly benign shows created on our collective psyche are forever.