I totally agree with Barry. I have a 3 yr old niece, and a 9 yr old niece. I have had a few heartstoppers when the 3 yr old bolted and ran right for the horses. Thank Epona that they are all calm and gentle and did not react badly. I have to suggest kneeling down to this little girls level and talking to her. A 4 yr old should have the ability to follow rules. Explain to her-
"You are going to see my ponies. I have rules about the ponies. The rules are that you must hold my hand when we go see the ponies. You cannot run away from me. You have to listen to what I say about the ponies. If you cannot follow the rules, you will have to sit outside the fence on a time out while I brush the ponies. Do you understand?"
Have 2-3 simple rules, and a consequence. Make her repeat the rules back to you.
I would suggest putting your mare up in her stall or in another pasture while the little one is with you. Do not put your horse in a situation she is uncomfortable in. You can acclimate the child to the horse over the stall door or through the fence. I would suggest having the child offer the horse a tasty treat such as a baby carrot or apple slice each time she sees her. Child can put treat in a bucket and offer it to her. This way your mare will see the little girl as a pleasurable thing. She may not ever be a kids horse, but you can at least make sure that she is tolerable.