It's highly efficient! Pinworms don't need to migrate through any organ tissue as common for other parasites. Their way of reproduction also works in their advantage since the eggs travel together with the herd of horses.
Pinworms live in horses's rectum. Adult female pinworms are laying yellow eggs around the horse's anus, leading to the worm being passed in droppings. The eggs are then picked up by another grazing animal, whereupon the pinworm larvae develop into adults. The larvae develop through various stages in the colon and become sexually mature in about five months. The adult worms then lay more eggs which are passed out in faeces, and so on. As horses migrate, they take the eggs and adults with them.