Your Pokemon need potions in order to help them heal right after a gym fight. On the contrary, once you have enough potions, chances are, there will be tons of Pokemon for you to heal. So, you end up tapping all of them.
There is actually a good way to heal these Pokemon simultaneously at a certain time. It is expected that trainers will have a hard time to claim their exhausted Pokemon in the gym, especially on a level 10 gym. Most of the Pokemon during this time have already fainted. Because of this situation, trainers are trying to figure out tricks as a solution to this problem. The first step is to hit Pokemon as many as three Pokemon at a time. This will surely work and help Pokemon heal at the same time. However, it is essential to hit three Pokemon quickly, since a nanosecond can affect the effectiveness of this trick. The consequence for this if you hit two Pokemon with a significant gap of seconds in between the two hits is there will only be one Pokemon which can be revived or healed at a time.
A certain user was able to discover this trick through curiosity. This user was Ezbius of Otakukart when he was hanging out with friends, and at the same time fighting gyms. It was later discovered that maybe hitting two pokemon at the same time would bring a difference to healing. Surprisingly, the two Pokemon that were hit at the same time healed together. So, they tried with three Pokemon just to see if it will still work. As expected, it also worked. All of the three Pokemon got healed at the same time. Get these words out to your friends.