If I can keep it moving away I can get past the aggression. If it seriously turned on me I would use the stick to touch the stun gun to it. Unless it did it again. I would apply the stun everytime it attacked me until it quit doing it. Each time it got up, I'd act like nothing happened and we'd go on.
Horses are pretty sharp.
It wouldn't hold the stun gunning against me. Animals have a very heightened sense of justice. They know instinctively that certain actions cause certain reactions. We as humans start justifying degrees and motives and then justice becomes murky. In animals, justice is cut and dried and accepted.