By "terrible" you mean a poor choice for a spell? Or poorly designed?
For the latter, I have to concur because it leaves open questions, and is very difficult to overcome/remove once being active (as pointed out by Celebrim). A mere 1 % chance per CL for a level 9 spell to remove a level 6 spell? Hrrrm, looks if it was ignored during AD&D to D&D 3.0/5 conversion or it is sort of a holy cow. Don't know. Either improve the efficiency of Disjunction, use an approach similar to Celebrim's (I really like the ideas, worth to flesh it out), or modify AMF for a better wording and clarity. Or simply ban it.
For the former, AMF is a still a good choice for all creatures that are good melee combatants, IMHO.
Big flying dragons are a combination of everything: arcane power, physical strength, good BAB and saves, wings, good senses, some immunities, best HD available, good AC. Take away the arcane power because the dragon is in an AMF (either widened, cast from a scroll by a large dragon, or supported by a beholder): the dragon is still physically strong and could still best a melee adventurer of the same CR (Snatch, Improved Grapple, or simply by number of attacks per round: bite -claw-claw-wing-wing-tail = 6 attacks, this can only be met by monk with flurry of blows or a two-weapon fighter).
Adventurers rely on magic support both by items and spells, the dragon does not (except AMF, maybe

). So it is simple: remove the magic component, and the party is in trouble. You need a very specific built party to counter this dragon strategy efficiently, or have an anti-dragon artefact.
The dragon (CR 21) I used in the battle would easily kill the ftr25 IMG in an AMF, because of more hp, better AC, better BAB, more attacks per round. And not yet using Snatch! An AMF'ed dragon is far more dangerous than a dragon without AMF.
In the said battle, the dragon would have been in trouble IF that Earthbind spell would have worked. Then the remaining party (the ftr, the cleric/templar, the warmage, the enlightened fist) would have killed that dragon most likely if acting clever and surrounding the dragon:
- the fighter does the melee damage (if she hits with all attacks, without using power attack, she does about 100 to 120 damage per round, without counting critical hits)
- the cleric buffs (Freedom of Movement) or heals
- the enlightened fist readies to counter any spell of the dragon
- the warmage casts offensive spells if the dragon starts casting spells, forcing concentration checks
After round 3 or 4, the dragon should think about getting away, if the ftr is not yet disabled or is badly wounded. If the dragon decides to grapple one of the casters to improve his chances for teleportation spells, the other casters would ready to counterspell. Of course, this tactic needs to be properly executed and thus needs clever players.