Quoted By:
Significant HP boost and status expulsion, as have already been mentioned, would be the best ways to get around the most common methods of cheesing them. Perhaps expanding the lore behind totems to make it so you aren't allowed to use items when fighting them because it's a sacred battle or something, to prevent the abuse of X items.
Including them as semi-optional encounters in a game that already has gym battles would be nice as well. I'm not really itching for gyms to return myself, but I know some people prefer them, and I think being optional suits totems more (at least in non-alola regions). Have gyms be main progression and totems be boss pokemon you can find in the world. You can completely excise the trial minigames, nobody actually gave a shit about that, just have the totem pokemon be standing or wandering around in the wilderness so gamefreak doesn't have to bother with event planning or writing. I remember when Sun and Moon were still in development wondering if there would be lots of totem pokemon and whether some of them would be secret, a little disappointed that's how it didn't shake out. They could be used as the way to continue giving the player Z-Crystals in later games.