These things continue to happen because after they are over, there are no consequences for most of the participants. That has to end.
Fortunately, since everyone records their crimes on cellphones, that should be workable. Confiscate the cell phones of every looter and rioter arrested, and let the police, or private sector workers hired for the task, identify as many of the participants as possible, and prosecute every single one for felonies.
Even if they are released on probation, they will have a felony conviction and be unable to legally purchase firearms or vote.
Mob violence will not stop until there are consequences for participating.