There is no need for such convoluted "solutions" that only complicate future encounter design. It's much easier to simply tweak the encounters in such a way that melee can either avoid the damage or won't have to be susceptible to it at all.

If the attacks have longer charge up times it gives the players more time to evade the attacks. Alternatively the attacks could happen at set intervals, or a boss could alternate between a "safe" mode and "unsafe" mode where no AoE happens during safe mode. You can also give melee a role other than actually hurting the boss, such as killing adds.