There was one mistake here. Carjackers and worse will often cause a minor accident, hoping that the other driver will pull over so they can attack them. So the way around this is to negotiate with the 911 operator so that you only stop where officers are waiting.
This even applies if you are in a minor accident in an unsafe area. You drive away from the scene of the accident and look for the nearest police car or police station, and tell them that you left the scene because it was in an unsafe area. In most circumstances the police will give you a pass for leaving the scene.
Even if you are armed, try to avoid a confrontation, as there may be several of them, all of whom could be armed, and you could be outgunned.
When I was a youth working in a gas station, some punks stole some cases of oil cans from the pump island. I told the boss, and he yelled at me to toss him the gun (he had me carrying a revolver in my pocket since I handled cash from customers and the till outside). So he jumps into his truck with the gun and takes off after the thieves. Ten minutes later, he comes back without the oil cases and looking shook up.
"What happened boss?" I asked. He said he cornered them in a dead-end street, jumped out with the gun and demanded the oil. Four of them jumped out of their car, all with guns. So he let them keep it and got the heck out of there. Outgunned. Glad when I left that job, as I was often the only one working there at night.