Though I guess, even the best episodes have minor flaws, the episodes I'd call 'perfect' would be ones that would get 10/10 (four episodes in all). I have more than four A+ episodes, but I think that an episode can still be an A+ and have (larger) flaws. Cape Feare for example, I reckon is an A+ episode, but has a few issues (a number of jokes that drag on for too long, and a weak-ish ending). However, what it does right, certaintly makes up for the few things that it does wrong. 10/10 episodes are Home Sweet Home Diddly Dum-Doodily, Marge Be Not Proud, Homer Badman and The Itchy and Scratchy and Poochie Show. Each of those has maybe a few minor flaws (minor though, which is why they still get a 10).
The strange thing though, is that some episodes don't feel like they have anything wrong with them, but aren't really top 10 material, I find. Like I don't think that there's much wrong with Bart Sells His Soul at all, but I put it below lots of episodes that do have more visible flaws.