As a teacher and parent (hopefully not too long a grandparent!) it’s the grossness of the language in Dahl’s books that makes them so attractive to kids. It’s the hero/heroine versus the hideous monster.
You can date it back to Perseus and the Gorgon, Beowulf and Grendel, George and the Dragon. Children are nasty little so and sos at the best of times. In my experience Dahl’s books got kids reading and that has to be a good thing.
You wouldn’t edit Shakespeare to make Bottom less ass-like, would you?