If you constantly give out treats at regular intervals then yeah, they'll become mouthy. Horses who have an extreme food motivation (like my mare) are also prone to biting when they always expect a treat. Because of her tendency, she only occasionally gets something
after I am finished working with her, so she never comes to the gate expecting a goodie but rather expecting to concentrate and do stuff for me when she sees the halter in hand.
I've also known horses who never evolved into the mouthy type despite heaps of treats/
A treat here or there can't hurt, especially if it's healthy. But I agree, in the "wrong hands", per se, treats have the potential of creating a monster. Not giving them by hand like Kelly G does is a good alternative if it's a concern.
I think the OP is doing great. The horse messed with him a little, which happens to everybody. He told him off for it, reportedly there were no further problems. OP didn't back off at all, which was the perfect thing to do. Doesn't sound like he's piddling around to me, just trying to get the horse healthy and comfortable in his new environment. Trainers and the like can come a little later. Grooming and simply hanging around them is a nice way to get the bond started...granted I haven't read everything, but thus far it doesn't sound as if Cody has tried grinding him into a wall.
Gate thing may have not been the safest, but we're all here to learn. For what it's worth it sounds as if the OP is no dumb bunny and knows to keep his wits about him, as well as how to deal with a hat-thief
I know more than a few of us started out with horses as complete novices. The trick is educating yourself, which is exactly what the OP is doing.
In a world with countless unwanted equines languishing in forgotten backyards or lined up for slaughter, this one little gelding was fortunate enough to find a home with someone who cares about him enough to post a thread and ask for our guidance and advice, I think he is doing a bang-up job, novice or not.