I find hitting to be about the least effective method anyone can use. There is almost always a better way to get the point across. For one thing, slapping or pecking at a horse often makes a situation worse or turns it into a game. In addition, you can get a horse quickly to a point where they duck and dodge every quick hand movement of a handler. I don't want to send a horse that message. You just replace one bad problem with another one.
Additionally, most often when a horse shows this kind of disrespect (or any other disrespect on the ground for that matter), it is only a symptom of a bigger problem. It usually shows up when a horse is lacking over-all respect. The horse is usually pushy or invades a handler's space (uninvited) or is less than responsive when asked to move over when asked.
If you want to be able to verbally correct little things like this, you have to establish a verbal response in your horse. I do this by using the "Ah!" command any time I get after a horse for anything. I can say "Ah!" sharply and a horse will quit wiggling for the farrier, will stop shaking its head when I give a shot, will stop in its tracks when it lays an eat back at another horse I am haltering and will step back when it has just taken a half a step toward me when I didn't ask it to.
My son, my granddaughters (2 and 4), the dog and every horse on the place that is even thinking about doing something it knows it shouldn't, stops in its tracks or backs up when Grandma says "Ah!"