Electric fence a very good idea. If no electric fence available to jump off of, they make solar powered electric fence chargers. Don't know how much you want to spend, but cows will often knock things over, and they will eat the weirdest things. The old standby of barbwire also works, but it must be pulled tight, or they eventually find a way through.
JC