No, a LOT of his characters do NOT do "the right thing" at all; quite the opposite. Though I'll grant you, the ending were usually "happy Hollywoodish endings"...where the villains were punished and the good guys won out. All quite unrealistic!
Re Pickwick..his most unreadable, dreadful book, with quite unloveible characters!
Dickens wasn’t a realist in the modern sense. He created his own universe and populated with more diverse types than any other writer since Shakespeare.