Although in the current times of riots, 15+rounds per mag of 10mm is good medicine.
You may need to shoot through a bad guy into more bad guys.
If you start shooting into crowds, you will either be going to prison or you will be getting beaten to death depending on who gets to you first. Or you might get beaten badly and then go to prison.
Small arms are not going to extricate you from a mob situation without getting you into a lot of trouble. You might get some deterrent value, but that's not going to be a function of 1mm difference in the caliber you choose.
Shooting into a crowd is almost never going to be legal because there's no ability to be discriminating about who will be shot. Even if you're aiming at one intended target whose actions might have justified deadly force, those behind and around are still in jeopardy.
The justification for deadly force doesn't change in a riot. You still need to be able to justify, on an individual basis, every person you put into deadly jeopardy. I can't see how that could be done if one fires using a crowd for a backstop.
Even pointing a gun at a crowd can result in charges being brought against you, depending on the circumstances, as this man found out.
https://www.nbclosangeles.com/news/local/upland-rifle-protesters-arrest/2374054/
If you're worried about riots, stay away from them. Avoidance is just about the only reasonable response for dealing with riots/crowds.
Furthermore, if things really do get so bad that you've decided that you don't care about the wellbeing of anyone in the crowd or about going to prison, you'd have to be crazy to get out of a semi (which is a far more deadly weapon and much better protection than anything a single person could carry) to engage with a handgun.