Even if the same form of a rule (ban X from Y) can be used both for good (ban Nazis from Twitter) and for bad (ban women from public places) we aren’t obliged to throw the rule in all of its forms away. We can apply the rule in ways that reduce suffering, and refuse to apply it in ways that increase suffering.
Not only can we do that, but we’re ethically obliged to do it, because it’s the ethical responsibility of humans to reduce suffering. Not conceptually, not theoretically, but actually, in effect and consequence, on the lives of our fellow humans. We’re not slaves to an arbitrary and inhumane objectivity. Systems of all types—software, legal, civil—have humanity as a foundation, not the other way around.