Obviously serious injury or death is different to a damaged wing mirror. But a near miss is just that. What if every time you had a near miss in a car (not your fault) you got out and attacked the driver or damaged their car? Does the law protect you because you had a near miss? No you get prosecuted for criminal damage, road rage or assault.
The OP said he only did it when contact occurred. I.E. when it was just luck that he wasn't injured or killed.
If you think that's no worse than damaging a wing mirror, I worry.
BTW, I'm not saying the OP is right to do what he did, but pretending that both actions are morally equivalent is ludicrous.