Complete Iconoclasm
Assumptions:
The D&D cosmological history is inconsistent, so we throw it out the window and replace it with a catgirl-killing evolution designed uncannily like our own before usual DnD race creation starts (a wizard did it). This isn't really anything special. Considering you are pulling in realism, it isn't that special of a fix for cross-setting play.
In addition to the dirty handbook fixes, no epic material, no artifacts, wish conglomeration, a sensical reading of the rules, etc, assume there were are 9th level spells for casters below ECL21. Basically each of these things is necessary for a campaign to hit ECL 20 without breaking down.
Creatures with divine ranks are basically just ECL 21 characters that gave into their pride so they could gain divine ranks (knowing full well that they would be worshipped as an idol). We of course assume that if it has stats, it can die.
Setup:
First we might want to track down a group of genetically related individuals (probably elves which makes this easier) so we can stay on task for later. At the very least we will want to make sure that we don't have any unfavorable relations. A few divinations allow family tree research to get to each individual and offer a painless death [GW] potion with gentle repose (res them later if you want to be nice). Although there should be none, individuals who are rarely powerful enough to stop you and dumb enough to chose being removed from existence rather than resurrected, don't need to be killed by you at all. So no assumptions need to be made, and its optional if you don't mind some slowness.
We also have to make sure that we can open (and shut!) a portal to the Far Realms even while pressure is applied to make sure nothing comes in. No worries, though, we don't have to supply the pressure or the portal, only the location. We don't even have to plan this part until the real job is done. We will also have to get an agreement from what we send back to wait and block or help close the portal on the other side due to the time difference. "Other methods of reaching the Far Realm include ... finding the true Dreamheart past the Portal of Sleep. Luckily for the Material Plane, entities from the Far Realm have just as difficult a time finding passage out of their plane, though rare spells allow them to be summoned." [MotP212] Due to the fact that we will be escorting something with the ability to already planar travel regardless of conditions (which we can do too), all we need is a point where the travel can work. Normally for travel within the great wheel, this isn't a problem but we are taking extra precautions. All it takes to get to the Dreamheart is an 8th level wizard touch spell and a DC25 wisdom check with a minimal investment in a cross-class skill.
All we need to be is a LN knowledge domain cleric 5 (or 3 with earth spell) / Entropomancer 10 [CDiv37] and Void Disciple 1 [CDiv] + Hathran 1. This gives us the ability to contact a Sphere of Annihilation safely and to find anything viewable within 1000 miles once a day. We will be a female Sparrow Hengeyokai with Human Heritage. We will be born in Rasheman but move to (and therefore be home to) the land over an obliterated kingdom. We persist Draconic Polymorph [Drac79] so we can be an outsider and take Infernal Bargainer. That allows us to bind Essence of Shothrogat because it's fun making idols go crazy and attack their allies. We'll eventually put some oddly-shapped armor on it with the +5 enchancement Proof against Transmutation [CA142]. There are other necessary spellcasting services or items that will be mentioned as we go along. None are very expensive or difficult to procure.
The Main Course
Now let's look at Elder Evils page 80. By making a few Know(arcana) checks DC28-42, we know that the "god-slaying weapon" Pandorym plans to rip all idols from existence. Considering it and anyone mildly associated near it was wiped off the map by those same idols, it definitely seems able to do the job. We even have ToM (Tenebreous) references for what happens to something like that, even though it can't pridefully call itself a god anymore. A lowball on Pandorym's CR follows: 50% body, 50% mind with a CR25 mind shard taking 10% of the prison holding the mind means the full mind is atleast CR250, and combined Pandorym would be atleast CR500. Yeah, it can fulfill its mission.
Pandorym is a Far Realms creature "parallel to the great wheel" and that fits with being an immortal hyper-dimensional being "as powerful as deities." [MotP212] Theres also the fact that "Ancient elves once pierced the boundary of eons with a vast portal to the Far Realms but their civilization imploded in bloody terror and the portal's location is long-forgotten," so Pandorym might be a singular example of something big making it to the prime.
To keep Pandorym on-track we can try to have already taken care of all or nearly every descendant it cares about before its multi pantheon killing spree. This depends on how many millenia it has been in its prison. We can give it names for the remaining ones and it can hypercognition to make sure we didn't miss any very powerful, living ones.
Considerations:
Since this is CO, we aren't assuming any ridiculous interpretations. Portfolios only trigger on generally big things, otherwise the Change or Time or Knowledge, etc domains would be self-referential and end the multiverse. Keep in mind that messing with the areas around Pandoyrm often qualifies as important. Therefore we have been very careful with what we do and do not do:
We are not adventuring (direct goal without a party or XP rewards) and can't ever be an adventurer but there are other ways to gain XP. We won't be needing any emotions or arcane casting. We can't be an artisan, archer, or engineer. We have no plans/strategy/tactics, just on-the-fly rash reactions thrown together sloppily and without pay. We haven't been studying any goals but we aren't stupid either. Think of it as using more charisma-based thinking. No luck factor is involved thanks to Aura of Perfect Order stance via items. There will be no cave traversing: it's straight to the complex. We won't be answering questions deceitfully or honestly until after all idols are removed. We don't mention idol's foresight so instead of communication, Pandorym just passively reads our mind.
Portfolio Crunching
Out of the 727 unique portfolios, here are a list the ones that come close to triggering and why they don't until we have Pandorym at our back:
*Dungeons/air if made not a dungeon* (vaccum seal outside wall of force in hallway out via body of pandorym pushing),
*Freedom* (only happens once we destroy prison from the inside. We can make the DC 45 will save every turn via atleast 12base will save+11 stance of perfect order+2iron will+6cumbrous will+6resistance+14wis easily with owl's insight),
*Future/Change* (for 20 weeks everything is normal, ie. nothing big changes before we break prison), *isolation* (We aren't isolated, so its not an "event"),
*Journeys* (we only go within line of sight after teleportation),
*Gems* (the crystal isn't actually one, and only a chunk is worth anything after its separation),
*Knowledge* (due to the way the knowledge skill works, we already knew about pandorym well before we decided to do anything crazy),
*magic/psionics/spells* (teleportation via amulet of the planes isn't direct magic itself or magic item artistry. Even if it does count under the portfolio, its unlike that binary knowledge of an amulet use would warrant the limited scrutiny among the twenty idos that might check, considering that portfolio competes with others and includes, well real every spell cast in the multiverse)
*Movement* (nothing big that "exists" moves until we are ready. Pandorym's body is specifically nonexistance),
*Protection* we should be using the below buffing routine for longer a long time so it is not unusual enough to warrant investigation besides maybe the first time when it is still boring,
*Righteous Action* (we are neutral and can simply will the action to not be considered all that 'good' even though wiping out idols does prevent idol worship),
*Running* (pretend we are at the pool),
*Secrets* (implies we are keeping this from others, but above, we instead making ad-hoc decisions. It's not anymore a secret than the fact that you farted while reading this),
*Sight* (don't look at pandorym's body or at anything in or around the mind's prison),
*Speed* (don't go fast),
*Spellcasters in General* (Don't cast new spells after the day's persist buffs. This hurts but is doable. As a cleric that doesn't only worship an idol, we can violate our own code of conduct. We can't prepare new spells around Pandorym anyway.)
*Intellect* (we'll have a +4 to the amulet of the planes roll so we don't have to use our intellect to make the check),
*Isolation* (we aren't isolated when we are with someone and can leave at any time),
*travelers* (we are only travelers if we move and aren't at home, so while initially teleporting around to find Pandorym's body, we don't move around).
*Time* (we aren't in the timestream for an 'event' until we want to be)
The Heist:
Get immunity to shaken(shriver)+ring of sustenance, the same Proof of Transmutation armor, mind blank, and magic circle against evil. We pull/push the body of Pandorym to the prison. When near we can drag it in with us. Since we are immune to disintegrate, we are alive in the prison. We need for 12.096 million (plus a few rounds worth of) seconds for a full telepathy reading to pass before we continue. Unfortunately we need to be outside the timestream as we aren't practically invulnerable like Pandorym. Thus we place ourselves in 78+3inches worth of quintessence (regurgitate it if necessary), pulling it into a seal with the last chunk. Since quintessence is outside the timestream, it shouldn't be destroyed by the prison. As long as the quintessence isn't rubbed away from us, it won't cease to exist at any point in time. After that Pandorym presumably ingulfs us (he can manage a hole, if necessary) to keep us safe and finishes the countdown for us.
Even "a tiny fragment" of his mind has a total of over 100 in mental stats. As a mind-crushing challenge to the world, it can figure out that we are waiting 20 weeks for portfolio reasons, before splitting us out to uncover us. Once we are uncovered, we immediately release a 11k Rod of Cancellation that pokes the wall at the place we appeared so it touches the inside of the prismatic wall. This negates the prison and frees pandorym's reunited mind and body. If you are worried about the prison disolving the Rod, consider a readied an action to immediate dismiss some persisted incoporeality with the magically resized magic item already out. There is no time between us being spit out and Pandorym being free. It is unlikely we would die immediately after that thanks to our Elder Evil buddies.
Also remember that we have Shothragot in there too. He might initially have Bracers of Spellsharing for persisted incorporeality, if you're really worried about blocking in the prison. Pandorym will figure out our intent (he can't initially hurt us easily before he's reunited, and he won't since we are helping). So idols themselves can't actually come battle Pandorym unless they are undead or severly nerfing themselves with draconic polymorph or incorporeality (Shift Form retains the outsider type). There are too few undead idols to worry about. That leaves only weaker minions (they require bracelets of spellsharing and with the armor enhancement for disintegration unless originally incorporeal) and they have to be (re)built to make the will save continuously but that's par with having lots of buffs.
Pandorym would probably crush them continuously even if they have magic circle against evil, mindblank, and were incorporeal, mainly because they would have to be entropomancers just to not get curb-stomped by the body. Real entropomancer aren't the correct type to go on a suicide mission. Training every suicidable creature with an LA (so it could become a PC and customize itself with levels in a PC class) to become an entropomancer is another bad option for the idols considering the time and XP needed. When said creatures fail, no one would likely res them. Since they are playing for a draw, said suicide minions know no one would ressurect if they succeeded. Therefore only the dumbest/most faithful servants would go up against something the gods fear aren't willing to fight themselves.
The Battle:
Or would they? They didn't last time, but that might be because the previous spellcasters had betrayed pandorym for them. So we are looking at an all-out fight to the death as their best chance. Then a minion or quasi-deity could wait the 20 weeks and break the crystal, assuming spells were still granted. Quasi-deity's aren't immune to disintegration so they would have to be buffed like the minions during the gank. Even assuming something managed to kill Shathragot:
There are 487 statted idols, assumably the nine alignments have equal pieces. Neutral and evil idols wouldn't self-sacrifice. Lawful Good ones would allow a fair fight and not continue the circumstances of betrayal. Chaotic Good ones won't line up for a cooperative fight and can't be trusted to not Leeroy Jenkins it. Only the Neutral Good ones would be useful, on average. If the top third have an average rank of 10 and their average HD is 40 then the CR Estimate indicates [D&D] 54 CR 50's or an ("Easy") EL of 170 for a CR 500 creature (0 XP when he wins). A 100% participation, coordinated gank raises the EL to "very difficult." For reference, I consider that the minimum difficulty optimizers should bother with (as a break from the usual "overpowering" kind).
Cleanup
I'm thinking team elder evil's got this. Even the wrap-up is nice. Once we come back and free Pandorym might have to go take revenge on a bunch of innocent humanoids, but hey, we can't stop him. We can rebind Shathragot to follow him while he cleans up the stragglers. Tharizdun may have to be whiped out from the Astral last, causing Shathragot to possibly not exist anymore. Once Pandorym's rampage is over, we pay to send him home via Dream Travel [MotP202] from a nice wizard who doesn't want the multiverse to end (but might not ever exist anymore). A DC25 check and the dreamheart is a place where he can poke through to the Far Realm.
Once you see off your world-crushing friend, you will probably be epic. Its a good thing, because there are some very powerful creatures that are quite angry with you. Now you've got the same choice to make and can help assure no prideful idolators rise up again. Good luck.