Right now among the Pokemon Go Community there is a huge ban override going on targeting those who put their Pokemon in gyms.
Basically all it takes right now is 3 reports at your Poke Gym and your Pokemon Go Trainer account can be banned. With this being said I strongly advise you not to leave any Pokemon at a gym unless they are weak and you’re looking to train desperately.
The recent bans are coming from a flaw in Niantic’s ban system where the system is literally banning from variety of report, meaning you have to be reported by 3 separate people to be banned.
UNTIL this is resolved and Niantic further provides us a statement allowing us to be assured their system has no flaws, I cannot advise you to put Pokemon in your gyms for the sake of not being banned. Those who are traveling are also randomly receiving a ban from the API. The system is all messed up right now and you guys should be alert about this.