Police locking up black people in America is the reason police in America were created.
Formal policing in America has a long and sometimes infamous history, but it definitely did not begin with "locking up black people"; it varied based on the locale.
For example, in NYC, it goes back to the Tammany Hall days and was notoriously corrupt.
In the west (where there were very few black people, and those that were there were free), police forces began with various marshals and sheriffs who were hired, typically by the merchants, to tame the wild western towns.
According to Time, "The first publicly funded, organized police force with officers on duty full-time was created in Boston in 1838."
In the South, post-Civil War, police used gold star badges because they were adapted from the gold star badges used by slave patrols.
You should learn more about the history of policing in America: https://podcasts.apple.com/us/podcast/the-history-of-america...
According to Smithsonian Magazine, 1 in 4 cowboys were black. I suspect popular culture (movies) are what's to blame for this misconception. Many fled to the West after the Civil War to find work.
https://www.smithsonianmag.com/history/lesser-known-history-...
On the flip side, we heard far more gunshots than fireworks when we lived in Kansas City.