OP, watch some horses out in the paddock together. If one lower in the 'pecking order' invades a more dominant horses space, the dominant horse will first pin its ears as a warning, and if the lesser horse does not move away, the dominant horse will either bite, or turn around and kick the other horse.
A kick, with say 5-600kg of muscle behind it, will do a lot more damage than a tiny human on the end of a little whip!
Do NOT be scared to hit your horse with the whip, across the chest, if that horse is barging into your space and becoming agressive around you and food.
There is much angst among younger and less experienced horse people, about hitting a horse being a cruel action, and that 'hurting' the horse should not be used in training. Well let me tell you - it takes a hell of a lot of force to physically hurt a horse. And sometimes, you really do have to act like you're about to kill them, to get the message across. Horses resond to pressure, and most strongly, the release of pressure with comment timing. Putting a little bit of pressure on in a half hearted manner will simply make a dominant horse 'laugh' at you. You REALLY need to mean it! And as soon as the horse moves away from that pressure, release it immediately and leave the horse alone. Having no pressure is the biggest reward you can give a horse.