I'm afraid I don't know the exact functions you would use to make this happen, but I think I have a fairly good idea of how the coding works.
Could you tie the sound to the rider instead of the horse? Give a random chance of a neigh coming from a rider with the condition that he is still mounted. Possibly trigger a dying sound when the mount is killed. Is that a possibility?
I can't think of a good way to replace the hoof beats, however. Those are a bit more complicated and are tied to the speed of the horse so it wouldn't be easy to replace a light clip-clop with heavier hoof beats.