Sounds like flystrike, I regulary sheer badly infected sheep with maggots over them, It's most common in Merino sheep breed because of their skin folds. Some make it with proper care, it helps when you are early for treatment. We normally shear the effected area then spary wound dressing like Extinosad.As a kid me and my friends found a dying sheep still alive while on the floor with millions of maggots eating it all over while falling out of its wounds and asshole.
