Team variety is ultimately driven by needing to respond to a variety of situations. When any generic option is better than most situational options, you’ll see strategies converge around that generic best option. Increasing the variety of situations the player must deal with, and making those situational effects strong enough that it’s inadvisable to just ignore and steamroll over them, will encourage the creation of more diverse teams.
The AI is also very simplistic, and will misuse many troops, limiting the teams it can be effective with. Improving the AI, giving it either more complex strategies, or having it pick a strategy based on the team, would make a wider variety of defense teams effective. Allowing the defending player to select a strategy for their defense team would give players another knob to tweak, which would make the defender feel more involved in the outcome.
Hard counters encourage diversity, but if they’re too hard and obvious, they have the effect of limiting choice. Every team doesn’t need to be able to beat every other team, but there should be a variety of effective options for any given situation.
Hero classes were presumably an attempt to make players different from each other, and the limitations on class switching were supposed to encourage players to pick one and stick with it, but it doesn’t mesh well with the team-building nature of the game, and only matter when using the Hero in a team anyway. Giving the player some choices that affect all their teams could be interesting, but would probably run into the same problem of players wanting the optimal choice for each team at all times, and thus either switching frequently, or asking for it to be selected on a team-by-team basis. Team options similar to banners gives players another choice to make, but there’s going to be an optimal choice, and people will figure it out eventually, so it wouldn’t necessarily increase variety.
Situational effects dependent on the battlefield have been suggested before. Different board shapes, or extra rules that may be favorable to different troops or strategies, would give the player something additional to plan around, or make generic teams less effective. It may also encourage a wider variety of home kingdoms. However, there will still probably be an optimal choice, though defenders will have to choose whether to prioritize defense wins or tribute.
Ultimately, I think the highest defense wins are going to come from hard-countering the current invasion meta, either because people don’t scout, or misjudge how their invasion team will fare against an unfamiliar defense. If a defense meta forms, an invasion meta will form around it, and the first ones to change their defense to something that counters the invasion meta will rack up some wins, until the meta changes again. That adds an active and creative element to defending, but it requires harder counters, and will lose some effectiveness if people start scouting more. That people don’t feel the need to scout is a symptom of balance problems.