For one thing, Unless you can read a dog's mind, you have no knowledge or control over the associations they form during the application of aversives.
Secondly, the association you are forming is one of unpleasantness. This works great if you're talking about punishing for raiding the trash (trash can = bad) but when the object the association is being paired with is a human or animal, what kind of an association do you think your dog is forming?
As with the trash can example, it would be: Human & Dog = Bad. Sure he may stop barking or growling or lunging but those are mere "expressions" of the dog's internal state. Take away the expression, has the internal state changed?
If a dog who has previously reacted aggressively suddenly stops barking & lunging, does that mean he is no longer aggressive?
Would you then trust that dog to go out into public among people & other dogs?
My answer to that is: You can hate someone without lashing out at them; that is, you can hate someone without openly "expressing" your emotions about or toward him.
For example, growing up, most kids my age were told to act "nice" around their parents' friends' kids, regardless of whether we like one another or not. So when the parents were around, we'd all act like angels toward each other, but when they weren't...
When NOT under the control of the parents - just like when a dog is not wearing the e-collar - the kids' negative feelings would come out, because, being forced to hold back or suppress one's "expressions" of dislike toward another - which manifests itself in the form of bark &/or growl in dogs - it does not change the fact that that individual still dislikes the person (or dog) in question, same as before.
In my friend's case, she went from disliking to hating the other kid because she was continuously forced to go with her parents to their house & be in that girl's company. The continued exposure made her more & more unhappy & stressed, and she became very angry & hostile when she so much as heard the other girl's name being mentioned. Not to mention her resentment toward her parents who let her down by not taking her objections & unhappiness into account because "they" wanted to be there. So much for trusting them to provide a solution.
So let's go back to our dogs. You have a dog that is socially unskilled & therefore nervous. You, would good intentions, want him to go places with you thinking it'll be fun. But all he does is hide under the table & growl &/or snap any time a person tries to come near or pet him (remember my friend being forced to go to the kid's house she didn't like?). Instead of acknowledging that your dog is not happy being in that setting, in fact he's actually disturbed by it, you choose to get mad & jerk on his prong collar for growling & snapping. After all, you did him a favor by taking him out to a dog-friendly place.
BUT did you ask your dog if he wanted to be there? No. So, how is that fair to him? How do you justify your aggressive reaction to his unhappiness & inability to tolerate the pressure?