A horse in the open is not likely to kill or trample anyone, and shooting at it would have been a mistake.
If the horse is charging directly at you do two things. Get something in your hand. Your shirt, your pants, your underwear, your hand, if that's all there is. Move straight toward the charging horse, and aggressively wave the shirt in your hand. The horse will change direction if there is room to do so.
Or get everyone together, get them down, and you provide the on-top cover. The horse will jump over you rather than run into you. On a race track a horse usually has no room, left, right, up, down to avoid a rider if he falls ahead of the horse.
Horses don't get angry! They run on nerves, and can easily panic. Unlike My Friend Ficker, horses usually don't give a damn about people. They do care about themselves, and even in a state of panic, will avoid running into things (and people) if there is room to avoid doing so.
I'm sure this thing happened quickly, and we're all Monday morning quarterbacking. TFL is a place to post opinion's and experience. That's my opinion, and I have the formally broken bones, and the hospital bills to back up the experience.