Originally Posted by
Doctor Despair
That's easily done. Immediately apply the God Blooded of Vecna template. All knowledge of you immediately fades from the world for everyone except you and Vecna. Proceed to dive into your pocket dimension / mansion / etc. Then you'd only be hit with effects that affect everyone everywhere, and if that sort of wish is possible, it's presumably also possible to wish that you aren't affected by those. It costs some LA, and requires you to undergo torture and lose all your facial features, but that's the cost of assured survival instead of RNG.
Edit: I take it back; there's a much more secure answer. Immediately use Greater Celerity, then Teleport Through Time to go back to before everyone had every spell.
Since archive.wizards is down right now...
Edit2: Since there's a finite amount of people in the world (probably fewer than there are days), even if everyone used Teleport Through Time simultaneously to go back in time, we still shouldn't land in the same year as anyone else, let alone the same month, given there's an infinite amount of years since the beginning of time. Additionally, we don't have to worry about folks going back further than use to lay a trap, as the spell declares how only minor changes in the timeline are possible, so any havoc they could wreak would be very, very limited in scope. This should, at the very least, buy you time enough to make any sort of preparations you want -- such as nesting a demiplane hideaway and encasing yourself in quintessence with contingent spells to wake you at your desired time after you initially teleported.