Poverty is also something that society can do something about; if you say that the problem is that America has created a large underclass, then that's the problem you want to solve. Flogging won't reduce the size of that underclass; it can only subdue it.
Note that life in the slums of Victorian London was not any better than for post-Civil War African Americans, for example.
If you control for first-immigration immigrants along with socio-economic disadvantages, most of the difference in crime rates between minorities and the rest of population goes away. That minorities were/are imported and abused plays a role only insofar as existing racism and social stratification perpetuates the disadvantages they suffer.
However, flogging will not eliminate racism or social stratification; if anything, it will do the opposite.