Forgive me if this sounds totally daft - but are you sure the worms you have seen actually came out of the horse's system? Only I do know on our grazing , any reasonably freshish dung is rapidly inhabited by little wriggly red worms that are immature or some sort of earth worm - they come up out of the ground and work their way through all the delicous horse poo!
Sorry if this a stupid suggestion - but did once have a friend say 'Urggh!!!

look at the worms the horses have got'!

Scuttled over to see the good old earth worms doing their natures job.

sons says they are brilliant bait for fishing though!