While in graduate school, the graduate student government had results from a student survey about their advisors. When presented with the results, nearly every administrator would give some response of "Well, it's really just a few bad apples," and we had to remind them every time of the actual meaning of the phrase!
I've done some digging on the history of the phrase, and find that 1) it's been in use for at least 80 or so years (several non-produce hits in the 1940s), and 2) clearly missing the "spoils the whole barrel" element seems to begin in the 1950s, with conspicuous application to police misconduct.
I'm strongly inclined to include the abbreviated phrase in a list of thought-stopping cliches if only for that reason (though not the correct and complete version you provide).
But it’s not one bad apple. It’s one cop who stole someone’s laptop while arresting them and entire system that looked the other way and let the theft go unpunished.