I think it is always best to put an electric fence around the hives. A solar charger solves the battery issue. Any large animals can and sometimes do tip over hives. The likely hood goes up as the density of animals goes up. In other words having some hives in with cattle on open range is a slight risk. Having some hives in with cattle in a small fenced area is much higher. I don't have a lot of experience with wild hogs, but the density would be the issue to me. Even horses will eat the entire hive, frames and all once they get a taste for the honey if there aren't a lot of bees in it. I have chewed up boxes that a ruined from horses...
A fence is cheap insurance.