Zoos, unfortunately, in today's world, are a necessity, and many don't practice cruelty.
The difference is, in factory farms, they are separated to be slaughtered, etc..
The realistic solution? More enforcement and protection for animals.
“The reasonable man adapts himself to the world: the unreasonable one persists to adapt the world to himself.
Therefore all progress depends on the unreasonable man.” ― George Bernard Shaw, Man and Superman