Discretion in enforcement is either lawful or not. If discretion is the key problem and lawmakers do not address it, then yes, the responsibility is on lawmakers and ultimately on voters.
Let me address victimization rates - because yes, they are higher in poorer communities. That does not justify in any way the behavior of police in those communities, which is to randomly pull over/stop and search/etc. people on the street who "look" like bad guys. If somebody kills someone, sure, arrest them and put them in prison. Most "bad guys" sent to prison are not violent offenders (drugs, theft, homelessness, child support, etc.) with drug possession being a huge chunk of it.
https://www.americanactionforum.org/research/incarceration-a...
The culture of policing is the key problem, which is created by a confluence of training, recruiting practices, general societal attitudes, and the political leadership of elected officials. It's not one problem, as you can see - it's many contributing factors.
A local town near me was praised some years back for drastically reducing violence by shifting towards community-based outreach policing. The local news actually called out Chicago for not following its example, you should definitely read about it:
https://www.aurora-il.org/1637/Community-Oriented-Policing-C...
Critics of community oriented policing typically view it as "being soft on crime" instead of a systems problem. The "put bad guys in prison" model has the effect of continuing the cycle of poverty, and measures such as mostly doing away with pre-trial detention (i.e. bond) for non-violent offenders are intended as a systemic fix for the poverty cycle.
Additionally, the americanactionforum.org link does not support the claim "Most "bad guys" sent to prison are not violent offenders (drugs, theft, homelessness, child support, etc.) with drug possession being a huge chunk of it."
The link is somewhat inconsistent. It claims "The United States currently incarcerates 2.2 million people, nearly half of whom are non-violent drug offenders" and "Of the 2.2 million currently being held in the U.S. criminal justice system, nearly 500,000 people are being held for drug offenses." .5M is about a quarter of 2.2M.
Looking at one of the cited sources [2, Table 13], the latest data is 2019 and states that a slim majority of prisoners are in prison for violent crime. Given that the ojp.gov survey does not include pre-trial jail, maybe % nonviolent drug offenders is different from the below data, but my null hypothesis is that the proportions would remain largely similar.
Violent: 55.5%
Property: 16.0%
Drug: 14.1%
Public Order: 12.3%
0. https://news.ycombinator.com/item?id=37598636