Identity is not a proxy for group membership, though. Identity is about what makes you an individual. It’s the story you tell yourself about who you are, as well as being how others perceive you via the story they tell themselves about who you are. It’s very much about the self, not the group. This is not my definition, by the way, this is the concept of identity as it is understood in the social sciences.
Maybe that helps explain the potential toxicity of identity politics. It is not the politics of the group. It is the politics of the individual. It is liberalism taken to its extreme. You have the freedom to write your own story of the self, substantially aided by a consumer society that directs you to construct that identity by collecting the trappings of pieces of ready-made identity, magpie-like. As part of that process, you construct a politics that is all about the defence of that identity against wider groups that would seek to weaken it.
None of that means it is bad to have the freedom to define oneself as one wishes, nor does it mean that individuals should be oppressed at all, let alone as a result of their self-definition. But the defence of the identity comes from a place of individualism not group solidarity, and that’s why it is the antithesis of a class analysis.