Yes, fairy tale characters can be generic. Witches are always evil. Heroes are always heroic. There is always a happy ending. Hang on. The Little Mermaid (the original HCA version, definitely not Disney's take on it) definitely is not happy yet it is a classic fairy tale.
So rules can be broken but it is true you have to know the rules well to be able to do so effectively.
Humour and irony are used to great effect in fairy tales (another reason I love them) and the best ones also get points across without being preachy. Yet there are sad stories too (The Little Match Girl. It's no coincidence I'm referring to HCA stories. This is partly because I'm studying a course on some of his works at the moment but also because generally his are the tales I remember best from my childhood and the ones I read most often).