Some goats just like to escape and they will need to be confined with better fencing, more goats won't change their habbits...
Others could care less about escaping, I was all worried about my goats getting out after reading about their escape antics in general and worried about several areas of my fence that are less that perfect, but my goats have never shown any inclination towards escape... Even if I leave a gate open during pasture maintenance they won't venture beyond maybe 50 feet of the gate opening, and will return to the pasture when I direct them to...
If you have goats that like to escape you will need to invest in knotted or tied goat fence or horse no climb fencing, avoid cheap welded garden fence as they can bust the welds and push out if inclined...