The issues with goats and cattle have been mentioned - they can be managed if you try, but it requires understanding and managing it. You need strong posts for cattle. For goats something they can't chew, and also if they can get on the panels they will so again strength where you might not want it.
You can grow corn under these if you want - you just need to be tall enough for the tractors to get under and other such concerns.
Cows raised in pasture that is properly managed and rotationally grazed - these can end up carbon negative.
* the pasture being well managed sinks CO2 long term.
* methane emissions from the manure decomposition is minimal
* the feed isn't trucked around
* if slaughtering and butchering are done on-site the only trucking needed is sending the beef product offsite.
Sheep are less chewy and are much more content in trying to find ways to kill them selves in new and difficult to clean up ways.
Sheep are easier on the surroundings in general.