I grew up on farm & we had two donkeys, Honeybun & Buttercup. Buttercup was older & eventually passed away, leaving Honeybun solo amongst the chickens, cows & horses.
Honeybun became ornery as all get out, just mean as hell. He’d started to bite anything close enough to be bitten. These weren’t little nips for attention; he’d draw blood given chance.
It got bad enough my grandfather carried a potato soaked in hot sauce to deter the donkey from biting. Grandpa would try to shove the potato into the donkey’s mouth when Honeybun went in to bite.
I know some donkeys get along well with horses. Honeybun did not. He bit those horses, went after chickens that wandered into his area, & likely would’ve done the same to cows if we’d let him.
I don’t have any specific advice for you, but I do believe donkeys get lonely & need some measure of companionship.