Unfortunately, I think that uncompromising, inflexible rules are ultimately not a sustainable solution to that problem, either. Even when you're actively trying not to be discriminatory when writing such rules, you're nearly guaranteed to either make them so broad that they catch people who are genuinely doing nothing wrong or so narrow as to fail to catch a lot of obviously bad cases.
No; the long-term solution, hard as it is, is to gradually push society toward a point where that sort of systemic discrimination is viewed near-universally as anathema to justice and to the health of the society as a whole, and make more rules of the type where a clear principle is outlined, a rule is stated with the principle as its foundation, and the people identifying and enforcing rule violations are assumed to be able to use reasonable human judgement.
No; the long-term solution, hard as it is, is to gradually push society toward a point where that sort of systemic discrimination is viewed near-universally as anathema to justice and to the health of the society as a whole, and make more rules of the type where a clear principle is outlined, a rule is stated with the principle as its foundation, and the people identifying and enforcing rule violations are assumed to be able to use reasonable human judgement.