A quick Google shows that ~20 people per year are killed by cows per year in the US. So not very dangerous, but not super safe either (cows kill more people than sharks - although that mostly shows how few people sharks kill).
20 people out of 350MM is pretty damn safe, even factoring for the relatively low numbers of people who actually interact with cattle. We as modern humans no longer have any sense of proportion when it comes to safety.
Cows are very safe for their herders, assuming there are no bulls (and there never are, those require containment). They can get defensive or spooked and then they're very numerous very large animals with hooves and horns, but their herders won't be the target of their aggression even if the herders are very mean. At least not intentionally.
Pigs are extremely dangerous to children in all cases (they will eat body parts with no hesitation and no effort, like carrots).
Goats are incredibly awesome and accept you as part of their pack and defend you from predators. They can also be assholes but playfully. As with cows, female only herds, as males are dangerous.
I've never herded sharks so I'll go with your opinion on those.