But that's not when "not all men" comes up, typically.
"Dogs are predators. Who hasn't been scared by a dog? Scratched by a dog jumping up on them? Been bitten or had someone they know bitten by a dog hard enough to bleed? If you're not terrified of dogs, what fantasy world are you living in? Dogs kill more Americans than bears, rattlesnakes, and sharks combined. Dogs are murderers. Dogs eat your face. And let's not even get into how they leave poop and pee all over the street and that's supposed to be okay. Make a godawful aggressive racket and we're supposed to think it's cute. The caninarchy systemically protects these poop-spewing nuisances, until they turn into face-eating monsters, with laws permitting them to spread terror, unleashed, in public parks."
That's when you get "not all dogs" / "not all dog owners".
In your dog account, you very carefully qualified what kind of dog you were talking about whenever it was ambiguous. A really horrible dog. Very aggressive dogs.
Furthermore, if you get a bunch of anti-dog tirades like the quoted paragraph above, people will start taking more innocent statements like "Dog poop all over my shoe again--what is wrong with dog owners, seriously?!" as a much more hostile statement than they would have otherwise. "Not all dog owners!" Mild views seem like dog-whistles for more extreme views, especially when the extreme views aren't challenged.
Posts that clearly delineate men-acting-badly as a subcategory of men are (I've observed) much less likely to get "not all men" comments.
Men do act badly in ways that women do not. Some men do, that is, with the fraction depending on which behavior is in question. It's a huge problem.
But part of the solution is to get people to change their behavior, which is a lot easier to do when they clearly see that everyone is judging them on their behavior not their identity. It is exactly because men do not side with or support the freak that they wish the distinction would be acknowledged.
Of course there's also a lot of denial; there are plenty of men who will simultaneously take offense at generic aimed-at-men statements ("not all men!") and then turn around and basically do the same thing. Improving that is a whole other story. But there's no scenario under which failing to draw clear distinctions does more to improve things.
If the goal is to vent, to feel heard, and to not worry about whether doing so actually makes the problem worse, just "men". If the goal is to push ever so slightly towards being better, then qualify whenever it's unclear.