‘Never work with children or animals,’ is advice attributed to the late American actor WC Fields. It would probably be quite difficult to write a longer work of fiction for adults without having any children as characters, or at least without mentioning children. So Fields’s advice is worth considering, but in a cautionary as opposed to a negative way.
As Oscar Wilde once observed in a letter to a friend, one must have a heart of stone to read about the death of Little Nell without laughing, and plenty of other readers have pointed out that some of Charles Dickens’ other child characters, such as the noble, long-suffering Oliver Twist, don’t quite hit the mark. But, conversely, these same readers would probably agree that the childhoods of Pip in Great Expectations and of David Copperfield are brilliant evocations of how actual, rather than sentimentalised, children think and feel.