A
spell turning spell will practically counter anything directly targeting Elminster on top of other protections, and it will turn back the spell regardless of where it was cast from, may it be the Astral Sea or the Warp. Other dispelling/counterspelling spells are difficult to pit against other magic system since they are based on the relative power of the opposed spellcasters but technically a
greater dispel magic can counter and dispel spells on any level below epic (see below for what epic magic is) and if Elminster is succesful at counterspelling any spell he may reflect it fully back. Also I repeat that as a spellfire wielder Elminster can absorb any spell targeted at him and convert it to raw destructive magical energy or heal himself. For good measure, I should add that Elminster is immune to mind reading and can't be blocked into a static time.
To put things into perspective, striking from another plane of existence does not require any epic spell, for example
a wizard can do this via
gate but can also decide to be creative and annoying. For example, Elminster may strike from another plane via
astral Projection spell'
'while his real body is hidden in his
magnificent mansion* protected by
mind blank (it hides him from all divinations and renders him immune to mind manipulations), sending forth his projection that in turn may hide itself in another plane, into its own
magnificent mansio, protected by
misdirection and
nondetection (to provide false results to divinations) while sending forth a
projected image. And his projection (but not his shadow double from
projected image) would still be protected by
Elminster's evasio.
Epic magic, on the other hand, can do literally everything given enough time and resources, like killing a greater deity
like this . And Elminster has access to epic spellcasting. Epic spells are not even related (at least not totally like non-epic magic) to caster level anymore, so epic spells by Elminster can generate the same effects of those by Karsus described in the the link above, aka steal the power of a 2-A entity.
Sidenote: The relevant RAW part of
magnificent mansio is: "only those you designate may enter the mansion." So he will be absolutely safe (after all, this is the reason the spell exists: to give the spellcaster a safe sanctuary anywhere he may be) unless ofc one of the Chaos Gods decides its worth to meet Elminster.
And frankly, Ahriman may bring the fight to the warp but still has to go around Elminster's
celerity to avoid being put into suspended animation/static time or sent face to face with any greater deity (which always act first unless pitted against a similar or more powerful deity, so I doubt Arhy will get any chance of leaving the place). I found the idea of Ahriman sent to the Black Pyramid of Seth strangely amusing.
This is the RAW description of
foresight in the 3.5 handbook: "This spell grants you a powerful sixth sense in relation to yourself or another. Once foresight is cast, you receive instantaneous warnings of impending danger or harm to the subject of the spell. You are never surprised or flat-footed. In addition, the spell gives you a general idea of what action you might take to best protect yourself". To evaluate
moment of prescience just look how it's used within the game: it practically turns any action into certain success.
But again, I'm reasoning only based on what wizards can do and what Elminster
can do, on what Elminster
is more likely to do, we need someone who has read all the novels related to him. But those 3 months of preparation are likely to drastically change his usual way of action, given his level of intelligence and the fact that the "very basic knowledge" he's going to get would probably be something like "you are going to fight a sorcerer of cosmic power".
We may also need some serious veteran wizard players, which I am not, to explore the most powerful combo the class has to offer. For istance, I can't decide how he could use his
contingency spell.
I've still not decided my vote.
EDIT: looks like I've lost something like a dozen posts while writing this, but it's almost 4:00 am and I'm going to bed without reading or editing.