My dad and I rented some partially wooded pasture for years on the edge of little Viola, IL. There were homes along part of it, and the fence was marginal. The cows got through a couple of times (the homeowners were nice understanding folks). We just added more barbed wire. The pasture also bordered the village cemetery, and the fence belonged to the village. When the cows got through there, those residents never complained.
Then the village bought a couple of acres off of our landlord, put up a new fence, and that ended the breakouts there.
After I grew up and moved away, my dad had to fence off the part of the pasture that bordered the development. He was allowed to let the cows graze on the neighbor's property. The problem we had then were people getting into the neighbor's property looking for “magic mushrooms” and then leaving the gates open. The cows then would sometimes get out onto a busy 4 lane street.
Cows are surprisingly less jumpy in that situation than if a bunch of horses got out, and miraculously in the 60 or so years I have been around none of ours have ever been hit by a car or truck. But there have been fatalities of both people and horses. Two of the incidents were people riding our horses.