This is relative and depends on the quality of the zoo, in addition it is important to emphasize that not all zoos function as a sanctuary or refuge in which animals have good veterinary attention and enough space to meet their vital needs such as running, breeding among others , on the contrary, they are places of low budget with sites not suitable for animals of certain sizes in which only basic needs are supplied for the animal to live in order to entertain humans.
Despite their supposed concern for animals, zoos are rather "collections" of interesting animals, even under the best conditions it is impossible to duplicate or approach creating something similar to the true habitat in which they live. Animals are prevented from performing most of the behaviors that are innate and vital to them. Poorly designed zoos only teach the public that it is acceptable to interfere and keep animals in captivity, despite their boredom, overcrowding, loneliness and deprivation of the most elemental natural ways of their species.
In sanctuary-type zoos or shelter, where they have animals in captivity in order to prolong life, the conditions are totally different. An example of this are the famous panda sanctuaries which manage to avoid the extinction of the animal.
If this question was asked many years ago, when men have not destroyed the natural habitats of the animals, then I don't believe that animals kept in the zoo are healthier. Animals are healthier when they are on their natural habitat, not on an artificial one.
However, since this question is asked now, when the people already claimed most of the animals' natural habitat, when the forests are taken down to make way for urbanization, then I believe they are healthier in zoos. However, in order for the animals to adapt, their new homes should be similar to their natural habitat.