You cannot expect a weanling, a baby, to take on the responsibility of a flock guardian. There are several outcomes to this scenario. Especially if they are horned. Donkey play is much too rough for sheep and goats or even calves. This is where some of that misinformation starts.
Donkeys play by grabbing necks and walking each other around.
Not appropriate and sometimes fatal treatment for kids and lambs. By 3 years of age, all of the play and silliness is over and a donkey is usually sensible enough to go to work. Resist the urge to get a jennet just so you can get a foal every year or so. Some people say jennets don't make good guards. I don't find that to be so.