In the wrong hands, and on soft-willed dogs, I agree shock collars can be harmful. But in defense of them, they saved my ability to hunt and compete in obedience with my late Labrador male. He had a really strong personality, and a sex drive that was more important to him than I was. I'd lose him when hunting, to the other group of hunters a quarter mile away. When I could finally run him down, he'd be trying to mount some other hunter's dog despite our efforts, cringing knowing he was going to get hit and do it anyway. It was worth any consequence I could throw at him, until the collar.
I used it to enforce two off-leash commands, "come" and "stay". I don't mean zapping the heck out of the dog, I mean having the ability to reach out over long distances and enforce a very necessary command that he ~knows~ but is ignoring. There is no substitute for off-leash remote control. It is much more humane than trying to punish him when I finally ran him down, much more humane than him getting hit by a car because he wasn't under control. When he put it on, he got excited because it was work time. He didn't resent it. It wasn't abused.
Ping to the above.
I agree that it makes no sense to automatically rule out disciplinary measures, but I also agree that with some kinds of aggression, calming the dog works best.
We rescued my shepherd/border collie mix from the shelter, where he had been ruled "vicious and unadoptable." It turns out he was neurotic and fear aggressive; he didn't respond well to stare-downs, etc. because they simply made him more nervous/fearful/aggressive. We rehabilitated him by immediately putting him in "time-out" in the room where he sleeps every time he did something that we deemed unacceptable. He would be up there from ten minutes or so up to an hour, depending on the transgression. This imposed our will but also quieted/calmed him when he misbehaved.
WhatNext, have you considered that your dog possibly likes going outside, and growls/nips in order to elicit this "punishment?" Maybe try a room where he doesn't have a lot of stimulation (but not a bathroom -- too small, likely to make him more crazy). Just a suggestion -- I agree that you're probably better off talking first to your vet and then to a trainer. You can also research/email vet animal behaviorists for advice, often for free.