This is not accurate.
The timeframe is not wrong; it is true that the concept of the modern police, at least in the US, was largely based on the Peelian model created in London in the 1820s. But saying it evolved from "warehouse guards and slave patrols" is ahistorical. Most modern police forces modeled after London's Metropolitan Police replaced night watch systems that have been around for literally all of recorded history.
I'm not saying the night watches didn't evolve into police departments, I'm saying the night watches were co-opted prior to them becoming uniformed departments.
And slave patrols led directly into being police departments in some parts of the US. I do not claim that's in the history of all depts, but across the south there are many cases of patrols becoming formalized into police departments.
For the slave patrol point, I would appreciate a single example of this phenomenon. Is it the claim that there exists at least one professional police force that was created to replace a "slave patrol", which previously performed some subset of the civil duties of police officers? I have not been able to find an example; can you point me to one?
The antecedent organizations to the modern Charleston police department, notably the Town Watch and the City Guard, were both dissolved in the aftermath of the civil war, while civil order was kept by federal forces until the end of reconstruction.
But regardless of whether we can chase down a chain of organizations that meets the colloquial meaning of "evolved", it does not appear that either the City Guard nor the Town Watch were principally slave patrols, although they did enforce the slavery regime as part of their policing functions.
An organization that participates in the suppression of slaves as part of its function is not a "slave patrol". If the statement "[modern police forces] evolved out of warehouse guards and slave patrols" is to be parsed as "modern police forces evolved out of earlier organizations that sometimes protected private property or enforced slavery laws" then I grant the accusation, but it is rather hollow and meaningless at that point.