The logic error is in thinking that a single abusive prison guard necessarily means that all prison guards are inherently bad. That's the same collectivist thinking as a racist.
I think the point of the referenced experiment was that "guarding prisons" was inherently bad, not the guards themselves.