The other aspect to this is that children's stories were typically highly moralistic essentially telling the kids to always obey their elders, Struwwelpeter is the perfect example, but also the Grimm stories (the tales of 1001 nights maybe less so, but I might be misremembering). I'd argue that this continued well into the 20th century. That's why pipi longstockings became such a success, here is a story about a girl (even), that is super strong, independent and generally self sufficient. It gave kids their own agency which resonated with kids and I guess the time was right that parents did not forbid reading it.
An interesting anecdote, in France Pipi Longstockings was heavily censored until the 90s because it was viewed as promoting disobedience. Naturally that made it so dull that nobody wanted to read it, so French people (at least those who were children then) generally don't know pipi. I only found out about all this when we moved to Sweden and my French partner had never heard of pipi, which I couldn't believe.
But Grimms tales and 1001 night were not originally childrens stories. They were entertainment for adults.
"(the tales of 1001 nights maybe less so, but I might be misremembering)"
I think you should reread some collection of these that isn't disneyfied. They're great, but probably not what you want to read to a prepubescent kid because that'll start all sorts of conversations you'd rather not have them bring up at school and elsewhere.
The framing is that a king goes to hunt but has to turn back to get something and sees the queen and other women of the court have an orgy with his black slaves, so he murders them all and gets sad. So he goes away with his brother who is also a king to get over this betrayal and finds a threatening demon spirit, who has a human female companion who sings the spirit to sleep and then talks to the kings and tells them that she's taken captive. But, she survives by being unfaithful and fucking random dudes they come across and collect trinkets to remember these partners by. Then she fucks the kings and they return home.
One of the kings then starts fucking a virgin every night and kill her by the morning, until Sheherazade is chosen, who instructs her sister to intervene after the sex, rape in contemporary parlance, and ask her to tell a story. The king agrees to hear a story, and by having an unfinished or another story to tell when morning comes is how Sheherazade keeps the king from killing her.
To late or postmodern sensibilities there are a lot of things to take issue with in these stories, like the casual rape, or insults that are derogatory towards jews and blacks, like calling someone as stupid as the stairs to a synagogue.
Still, they're fantastic and hilarious, and have a lot of interesting information about life in Asia and Africa during ancient and medieval times. They also invite careful thought and deliberation. At least one swedish translation is quite suitable for reading aloud with a partner, something my wife and I had a lot of fun doing way back when we didn't yet have kids.
As for Pippi, she messes with cops and orphanages and refuses to go to school, so it's easy to see why some uptight jurisdictions would censor it. Personally I consider The Brothers Lionheart to be a better story, but its ethics are less obvious and it also starts off with a kid dying violently and another from disease so it's not immediately comedic in the way Pippi is.
Even the Disney Pinocchio movie is about telling kids to obey their parents, in ways that 2000s Disney movies probably wouldn't do.