Once the dog is over threshold his mind is over stimulated and he isn't learning anything. So you weren't teaching but punishing him. Nothing wrong with a needed punishment but it needs to be completely clear and concise to the dog why he is getting punished. Not really sure punishing a dog for being excited is my cup of tea though.
Once we were walking along a river bank and I was so focused on a conversation with my friend that my dog saw a guy fishing and literally swam into the water and tried to get his orange fish bobble. I apologized profusely but the guy didn't look happy at all. I'm a fishermen myself and I would've been pissed! It's hard enough to catch fish when it's completely quiet.