I'm not sure everybody knows that
most animals in zoos when given a choice prefer their enclosure to the wild. This includes older and worse exhibits. This especially includes great apes.
Proofs are many. Chimpanzees and orangs reintroduced to the wild usualy need to be forced to go and forage on their own. For example, orangutans in Kalimantan are fed only plain bananas to force them to look for food. Circus chimps in Tanzania were scared on the wild and wanted to stay with men.
In zoos you see lots of wild birds trying to enter into zoo birds cages and ponds. So, what kind of captivity it is if captives queue to be imprisoned?
See yourself that zoo exhibits for non-dangerous animals are often not escape-proof. Barrier serves to limit animal familiar territory. So you see antelope and deer behind narrow moats. Bison who jump 2 meters in the wild behind cattle fences. Camels behind 0,5m shallow trenches. Free-flying birds and free-ranging primates. Etc.
Most animals who "escaped" return to their cages or keepers. Naturally, unless they are public danger and are brought by force as soon as possible. You can read numerous accounts of e.g. birds which would be impossible to catch but come back. If they escape, if is usually because their social group is imbalanced and they must leave the herd.
You can also read accounts of older naturalists, like Konrad Lorentz and Gerald Durrell, who kept their pet animals free and they always wanted to stay where their food bowl were. Durrell account of releasing animals in Paraguay when he was forced to flee the revolution is even funny.