People always say "if someone wants to take down a gym, they will". Which is generally true, but uninteresting... if you don't think about the first clause. It has been known since the early days of GO that the best defense is not being attacked. In the previous gym meta, 10-story-tall towers filled with Blissey and city-wide dominance prevented assault by breaking people's will to fight. In the new meta, gyms are limited to 6 slots with no duplicates—declawing Blissey’s influence—and with motivation decay, any defensive power a gym had is forfeit after a single assault (or a few hours).

What prevents gyms from being attacked in the current meta is the availability of weaker targets. Gyms that contain a relatively motivated Blissey and Snorlax, gyms with near-fully-motivated Pokemon, tall gyms that suggest power and motivation, and use of Pokemon that cover each other's weaknesses are all sources of deterrence that make trainers think twice about attacking gyms. Even the illusion of a raid boss “taking over” can steer players away.

This meta-analysis covers all of these strategies and attempts to synergize them to produce the ultimate gym defense. Not only will the strategy provided give you the best performance in terms of wasting your opponents' time and causing them to waste potions, but will also make the majority of players think twice about attacking your gym in the first place; be it for gold or glory.

For an audio version of this meta-analysis check out this video