Consider that a cow or other animal raised for slaughter would not have otherwise existed. Is it better to never have existed, or to live and be harvested? As for the factory part, I live in cattle country in Montana. I see acres of open spaces, and cows frolicking and enjoying themselves. They don't have to be packed shoulder to shoulder in crates their whole life.
I think the terror of understanding that your companions are disappearing day by day and any day now your number will be up combined with the final moments until execution probably exceed the fun of running about in fields. We may have no way to know. But then we have no right to assume this isn’t the case.
Consider this exact situation, as you described it (edit: minor change, sub execution for some other death), plays out for aging humans. Dying is usually not pleasant and it happens to us all.
You dodged the question. Is it better to live a life in terror than not having lived at all?
If these animals lived in the wild in such numbers, they would eventually overbreed and starve, unless there was a predator animal that kept their numbers in check.