How exploitable/balanced is this homebrew spell: Spell Ward?

I am designing a trap for my players. One of them has Disintegrate (known to their enemies), which would make escaping the trap relatively easy. I would like to block this method, once. To achieve this, I have designed the spell below, and in the spirit of not overusing magic that’s not available to the players against them, plan to make it available to them too.

Before implementing this spell in game I would like to be aware of the potential ways in which this spell could be unbalancing and/or exploitable. I have already considered making the spell a general (single-use) ward against any spell, and dismissed that as frightfully overpowered. I am aware that putting this spell in the world will increase the power available to my players (it’s something they can set up prior to an encounter with no tradeoff in capabilities during that encounter) – my aim is that it not cause a very large increase in power because I missed an edge case.

Spell Ward

3rd level abjuration

Casting Time: 1 Action

Range: 120 feet

Components: V, S

Duration: Until dispelled

Choose any creature or object within range, and name a spell known to you. You place a ward on that creature or object. An unwilling target must make a Wisdom saving throw to resist the ward being placed on them.

While the ward remains on the creature or object, the next time they are targeted with the named spell or an effect of the named spell, they are unaffected and the ward is dispelled.

The ward offers no protection against spells that would be immune to Dispel Magic.

If Dispel Magic is named as the warded spell, no other spells on the warded creature or object are dispelled when the ward is dispelled.

So: how balanced/exploitable is this homebrew spell?

Here is a non-exhaustive list of possible changes I’ve thought about that could balance the spell if certain aspects are unbalanced.

  • If the spell is unbalanced as an offensive/in-combat/shortly-before-combat tool:
    • Remove the ability to cast this spell on unwilling targets
    • Increase the casting time to 10 minutes
    • Reduce the range to Touch
    • Remove the special Dispel Magic case, stopping it from being a counter to an enemy dispelling effects
  • If the spell is unbalanced as a counter to high level spells
    • Require an ability check like Dispel Magic’s when the ward is hit by a spell of a higher level than it
    • Only allow the ward to affect spells of the same or lower level than the level it was cast at
  • If the spell is unbalanced due to its infinite duration
    • Reduce the duration to 10 days, in line with Contingency
    • Require a material cost for the spell along the lines of Glyph of Warding