I would rule that the 7th layer does not destroy the lava and more then a dome under the ocean would drain the ocean or that air is destroyed if cast outside. I do not think that it would destroy anything unless it is actually pushed into it.
Forbiddance prevents teleport but can be ignored by spellbane. I would trade gate for it. The duration is long enough that it can be kept always on. PCs could use this to freely teleport in the lair.
A wizard who cast spell bane and targets wall of force, prismatic sphere, forbiddance, and private sanctum is immune to all the magical protections in the lair.
A second casting that targets antimagic zone, dispel magic, greater dispel magic and mage's disjuntion will make the first effect undispellable.
A third casting should target teleport, dimdoor, plane shift, and limited wish. This negates any spell he can cast to move.
Form of the dragon 3 grants fire immunity. This can probably be done with a lower level effect but it rubs his nose in so I like it.
Freedom of movement lets you move through the lava.
Ride the waves grants a swim speed.
UMD a bead of karma, orange ioun stone, varsian tattoo (universal), gifted adept (wish), and spell specialization (wish) will add +9 to the caster level of any spell cast with wish.
Spell resistance cast through limited wish make grant SR 41 witch makes the bearer immune to all spells cast by any creature in the encounter.
Wish to cast control winds will remove the smoke in a 40 plane around you but the creatures high up will be still be hidden by it.
Wish invisibility purge will strip the dragon of that defense any where within 145 feet.
Contingency plus emergency force sphere grants nice physical protection.
Mind blank keeps the dragon from being able to divine what I am doing.
Assume an 8th level slot is always in use to keep mind blank going.
End of Day 1: Spellbane x3 as above and contingent emergency force sphere triggered to activate if dragon about to attack me physically.
Day 2. Cast all of the above spell except to deal with everything in the lair. The spell resistance has the shortest duration at 29 min.
The wind speeds prevent archer and Eyrines can not fly in the area at all. The Vavakia can teleport into the area and remain in place against the winds but the demon only has 35 percent chance of being able to hover near until its next turn and it will need to make that check again if it going to full attack.
In order to use their breath weapon or physical attacks they will teleport into range. This grants the wizard a an action against them. Banishment should be able deal with both of the them at the same time if they both attack at the same time. Better have several memorized just is case.
3 9th level spell slots have been used on wish plus several lower level ones. A 20th level wizard will have either 2 or 3 left depending on his int.
So far only 3 feats have been used and very small amount of WBL to increase cast level has been used. The dragon's spells and breath weapons have been made useless. The contingent force sphere will protect against a physical attack.
With Elf plus 2 more feats gets one close plus the caster level items gets the caster level checks on SR up to a 31. This enough that the banishment is not a roll and the dragon only requires a 2 to cast through.
Once the dragon attacks and you know where he is you could time stop and prep a several casting of dazing ball lightning or disjoin the area and all spell effect on the dragon. No more contingent teleport. If the rod of absorption is still is functioning a quickend dispel magic from 25 level caster suppresses it.
After disjuction you could gate in a an angle to beat the dragon senseless
Since he can not flee by magic while close to you or at once disjoined a wall spell might be in order over the entrance.
A couple of solars should do the trick. A greater quicken rod get them here in 1 round.
Several feats remain and much money.