My wife travels a great deal and I worry all the time about just this same carjack scenario. Just a little tap to get you stopped and out of the car. A scumbag isn't too concerned about the condition of his vehicle, but honest working people are. Also, being law-abiding citizens, they're aware about the laws for stopping after noninjury accidents and exchanging insurance info. That's why even after very minor fender-benders honest people stop and exit their vehicles. Carjackers know this and count on it.
My advice: don't second guess yourself.
You were aware of your circumstances and you were prepared to protect yourself. You used verbal warnings and didn't lose your head with the weapon, didn't fall to an obvious ploy to get you out of your car, and immediately called 911 with the incident then in progress. And nobody got hurt - most importantly you. From your description, I'd say you did all the right things.
Especially suspicious, in hindsight, is this guy's high-tailing it from an accident scene when you told him the police had been called. Now, maybe he just had warrants and fled for reasons unrelated to you. Or, maybe he did have an illegal (unpermitted) handgun and was intent on taking your vehicle, or you and the vehicle. But whatever the case, your observations and awareness alerted you to the risk of the greater danger, and you handled it appropriately.