|Dr. Calvin Murgunstrumm|
Using things like Otataral from Erikson's Malazan books to allow martials some effectiveness against casters and embuing fortresses or at least vaults with an anti-magic capability which is not magic itself can be an effective means of balancing casters.
Also, using tactics which account for them. OOTS is full of excellent battle scenes where casters are nullified by clever strategems, do the same in your world. Create encounters that expect casters, use wands of greater dispel, have casters rocking counterspells, throw in some SR for good measure.
Use dungeons that react to magic being cast in them, effectively nullifying certain spells, like a dungeon that shuffles its room locations whenever teleport is cast, or a dungeon that requires a key to navigate safely.
Create spells dedicated to undoing some magics. Create feats to give martials nice things. Drop magic items selectively and close the magic item stores forever: make it craft, find or recieve as a gift or reward. GP is for mundane things. Also, tack on quests to craft items and minimize downtime: this keeps casters from going craft crazy.
Give martials some in world benefits: a mage guild or a temple can provide spells and components for casters, a knightly order or a theives guild can provide influence outside of the rulebooks: allies who will side with the fighters and rogues as non feat cohorts for certain quests, will provide fantastical animals for mounts or allow for social achievements that would be harder to accomplish via spells. These things give martials agency without rewriting their classes.
As for silmulacrum, give the genies, etc. wishes, but just go wishmaster on the PCs if they abuse it: the genie's essence is false so the wish is corrupted, the genie's body was empty so the soul of an ancient, powerful, and evil genie has filled the void, twisting the wishes until it is free of its new master, etc. etc.
None of this violates the RAW, in fact they become adventure platforms, and adventuring is what the game is about.
And Rule 0 is RAW, whether DM fiat or not. As long as everybody's having fun, then Rule 0 is tops.
Key note though, which will likely be ignored in rebuttals, but I'll put it in anyway:
Moderation is key here. Every dungeon with Otataral, only cool guilds for monks and rogues, every encounter rocking counterspells, this becomes tedious and punishes casters. If your casters are sharing the reality bending goodness for all, don't hit them with the nerf bat. Only the selfish, "stand back guys, me and my 50 summons and my eidolon have got all the encounters, always" types need that bat a lot. The rest of the time these balances should be fun challenges which deserve rewards for overcoming and out thinking.
And clever spell casting, within RAI, shouldn't be discouraged just because it bypasses something you had planned: don't punish players for out smarting you. That's a good thing when they do. Reward it.