This is pretty good. Others have outlined the story, so I just want to mention that there is a superior version of the original French novel, and it was released a year before this episode aired. It's a French movie, directed by Georges Lautner and starring Bernard Blier, who like Dean Jagger was an excellent(and bald!) character actor.
Lautner's movie is, if anything, even more scathing about small town small-mindedness. The two versions develop the story differently, and not having read the novel I've no idea which is more faithful to it. Suffice to say I saw the French movie on DVD, and it's well worth seeing, assuming you can watch a film and read its subtitles at the same time (I pity those who can't; they miss an awful lot of great stuff.)