Good for you, for deciding to rescue. However, the majority of rescue dogs, come with baggage and much of it, can be difficult to correct.
Step 1. Keep your dog away from the minis.
Step 2. Good obedience course with 'you' handling the dog and with lots of other dogs in the class. This teaches him to keep his eye on you with lots of stimulation going on around him. Be faithful in working him at home between classes.
Step 3. After the obedience classes are over, still work him at home on his commands. Add to his already known commands, the words 'leave it'. You can set up many types of experiences to do this. Put him on a 'down-stay' and put a toy a little way in front of him. Once given the command 'leave it', he is not to touch it until you give him the ok, or until you take it away. He is to learn to drop anything in his mouth, with this command also. This command is one of the most important lessons you can teach any dog.
After he is well trained in the previous, then on to..
Step 4. Have someone walk one of your minis and you, with your dog at heel and on leash, walk in the opposite direction, about 30 feet away. Do this over and over again. If your dog lunges or shows any interest at all, he is given the command 'leave it' and put on a sit. Resume the walk many times until he shows no interest. Gradually make the distance between mini and dog closer, until you can walk by each other, with your dog showing no interest. Praise when he shows no interest
After this is all done and he looks as though he's working well in every respect, put him on a long-line and work him. See if he will work well when not right by your side. Don't have the long line so long that he can actually reach the mini, but long enough so he's well away from you. If he does not respond, he's still not ready to be let loose with the horses.
You say he runs off. Work a lot on the long line, with recall. Praise when he comes to you but never scold him if he runs off, once you've caught him.
This should all help with getting your dog used to being around other animals and the horses. There's a lot more to this, but I have given you some basics. Don't allow anyone to wrestle play with the dog, until completely trained. No tug-o-war games either. I've trained a ton of dogs and many which went to Viet Nam for the troops. All dogs, whatever size or breed, should be trained IMO and with a shelter dog, one is dealing with the unknown. With good training, no electric collars should be needed. It's not a training method.