Hi Julie, Welcome to Permies!
I'm not too familiar with donkeys, but I am very interested in animal behaviour and learning in general. I think it's up to you what behaviours you want to allow or discourage, and many animals have instinctual behaviours that might be stressful for the animal to suppress. Hopefully someone more familiar with donkey behaviour can comment on that.
In general, if an animal does something potentially harmful toward me, I ask them to leave or back up. Otherwise the animal might learn that if they are naughty, you will leave them alone. This would make future medical procedures and such harder if the animal thinks it can act up and get you to leave it alone. Of
course all my animals have been smaller than me so...maybe it's different for large animals.
Sounds like your donkey might be wanting affection, so leaving the area might be appropriate reinforcement of "if you're too rough, affection goes away".
I might ask, what does the animal want to happen, and not do that until they are nice and calm and waiting. For example, a dog is jumping on me while I make its food, I think it wants the food and is seeing if jumping up gets it faster. Or maybe they are just expressing their excitement, but neither of those behaviours achieves food. I wait until they are calm and sitting and give them the food. They learn that jumping doesn't get food, sitting calm gets food.
An example of pushing the head away when a donkey thinks about biting:
In the video, the donkey learns that going to bite gets a push away, and that waiting nicely gets an invitation to touch the rope.
Another way to decrease a behavior is to train the animal to do it. Theoretically, once they are trained to do it for a treat or affection, they stop doing it "for free".
I know it's important to train bite inhibition in dogs, to teach them to control the pressure of their bite and teach them how hard hurts people. I don't know about donkeys, maybe lips only, never teeth? A loud "ouch" just before it would start to hurt is usually
enough for puppies to learn a soft mouth, but I don't know if that would startle a donkey....
A video from the same person showing how to give a treat to a toothy donkey:
I think it's important to have a command that means "stop whatever you are doing". It doesn't have to be mean, just firm. And the key is to reward as soon as they stop. That's my
experience with smaller animals anyway. For an easy to digest, general overview of animal learning and conditioning, I always recommend the book "Don't Shoot the Dog!: The New
Art of Teaching and Training" by Karen Pryor. Hopefully someone with actual donkey experience can share some advice also.
We'd be interested to hear how it goes and how your donkey gets along with a new goat!