Few thoughts, sort of jumbled... I own two horses and a pony, and we keep a third pony that is someone elses. I also work on a farm that has 10 horses, 6 goats, 2 sheep, 4 mini cows, and other stuff. My wife now manages our horses and uses them for lessons in addition to being a farrier but she used to train horses on a 50+ horse farm.
1. A fence for a horse and a fence for a goat are two different things. A horse fence is all about strength and psyching the animal out so they do not believe they can get through it. In reality, you are not going to build a horse-proof fence. I own and ride horses and besides some of the TOP tier thorough bred stables I've visited in KY, I have never seen a horse fence that was truly horse-proof. What I mean by this is that a health adult horse will be able to jump over any fence you build. The key is that the horse has to have that desire and they generally are very anti-jumping. I wouldn't even bring this up, but 5a is a bit small for a horse and if they get spooked, say a dog gives chase, they don't have enough land to just run out the terror and they could jump. My wife had a client who had a similar sized pasture for three horses and the horse jumped the fence.
2. For horses you just need a two or three board fence constructed with poles sticking 5' out of the ground every 8'. Goats will laugh at such a fence. A goat probably needs welded or woven wire, which would work for a horse, but unless you get it professionally installed a horse can just go through it if they so desire.
3. Probably need two levels of fencing. A traditional 2 or 3 board fence on the perimeter of the property with woven/welded wire on the OUTSIDE of that fence, ie facing away from your property. It's ugly but a horse could pull woven/welded wire out of a fence simply because it is BORED (highly likely on such little land). And then the goat will capitalize on the boredom of the horse. The second level of fencing would be electric and this would be for the goats.
What I'd do is keep the property fenced as I said in point 3. Then get two full sets of electric fencing. One for horses and one for goats. In addition to this get a few extra runs of this fence for easier pasture rotation. Rotate the horses through the pasture FIRST and then move them out, wait one rotation, and move the goats IN. Here's why: horses are ALWAYS the first to get into a pasture because they eat grass to the dirt. You don't want them to do this so you put them on the freshest grass so that they don't kill your grass. If you had
cattle and or sheep I would keep them exactly behind the horses. But since you have goats I'd wait a week. In absence of that grass your weeds are going to sprout up and goats will devour the weeds that horses will simply not touch. By waiting that week you are allowing the goats to get some fresh weeds plus giving the grass a chance to recover because goats are also very destructive grazers, but out of boredom as opposed to horses which are out of hunger. I'd also get chickens and keep them with the goats. Goats, as opposed to pigs, won't kill the chickens so the chickens are safe. The chickens will pull apart the horse manure and eat the bugs in it plus spread it all around. This saves you the effort of going and dragging your pasture every week to pick up the manure so that the grass doesn't get burned.
Last thought: no matter how cute, how much your SO begs, or how much your child pleads, DO NOT GET A PONY until you have spent a few years with horses. Horses are easy going and lazy. They are happy to sit in a fenced in pasture and eat grass and
hay. Ponies WILL try to escape. They WILL figure out how the gates open. They WILL figure out, like someone else said, when the fence isn't as electrified and exploit that. Ponies are hard work and temperamental to
boot. Start on horses and if you like them, in a few years get an easy going shetland that has been sitting in someone's backyard for the last few years. I'm serious, when my wife worked on the horse farm she'd regularly have to go catch pony escapees. Never a horse, even the one time some client came to visit and left the gate open all night. The horses stayed in the pasture, only the ponies left.