OK, I'll bite. Your social error, leading to claims of sexism, was linking bad HR people and women.
I believe you when you say that's what you've observed. But, whether you like it or not, it's not okay (in public, at least) to make statements which link gender, race, etc., with competence.
No fair, you (or some other reader) might say. I'm just reporting my observations. But I claim that you have a responsibility to do more than simply report your observations, and it's because people are stupid. When we read "A and B go together," we humans immediately and instinctively (system 1) draw causal conclusions about A and B. It doesn't matter if it's anecdotal evidence; it doesn't matter that correlation does not equal causation. Not for System 1, anyway. And those causal conclusions lead to making bad subconscious assumptions, and later lead to actual sexism down the road. All because of comments like yours -- "A and B go together".
So don't do it. Suppress your urge to report your observations when they could lead to others making sexist/racist assumptions in the future. Bad HR department? Say "bad HR department" and leave the part about gender out.
(I would say that this only applies to speaking/writing in public. In private, you know who your audience is, and what conclusions they will draw from your words, so you can afford to be freer.)