The way I run wish is that it is the most powerful spell a mortal can access. There are limits (no, "I wish for unlimited wishes", "I wish to become a Greater Power", etc), but that wish spell will try its hardest to make whatever you wish for happen within the limits of what I feel that mortal magic should be able to accomplish. There aren't any epic spells in 5e, and for me, wish takes their place.
So if you try to do something more powerful than what a 9th level spell could normally do, it isn't that wish is trying to screw you over, but rather that it's trying to channel the energy to make what you want happen, and if that thing is beyond the normal capabilities of a high-level spell, it has to cosmically balance out the effects to get that energy to do what you want.
Enter drawbacks. Whenever you wish for something beyond the normal limits, the wish is either going to have to take the route of least resistance, or it's going to have to have negative effects to balance it out to the same general power level. If you made a wish that used completely ironclad language to ask for something way beyond what it should be able to do, and there really wasn't any other way to interpret it as doing something other than exactly what it asked for, it would probably just fail to work--though that's an undesirable result I would try really hard to avoid. Any spellcaster who actually knew wish would know enough to avoid casting a wish that would just fail. (If you get the wish by other means than being able to cast it...well, that's when you're most likely to over-reach or screw up.)
One additional element that I include is that the caster can intentionally attempt to cosmically balance a over-powered wish. This could be done either through some expensive ritual (sacrifice a powerful magical item for more juice, etc) or from specifying their own chosen drawbacks. If these things are actually fair (ie, the drawbacks actually matter, the ritual is actually powerful enough, etc) then the wish will likely work. Boom, epic magic. (I have a friend to thank for that idea.)
So in this example, here's how I'd look at it. There is an epic boon that does exactly what this is asking for. Epic boons can be handed out as a form of advancement beyond 20th level. So asking for an epic boon is kind of like asking for a free level. Asking for that kind of permanent character power increase with a spell isn't really something within the normal power zone. But the actual thing asked for is within the realm of what a character can have (it actually has an XP cost associated with it!)
Here's what might happen:
-The player gains the epic boon. This boon is an "advance" on their first epic boon. The first time they would gain enough XP to gain an epic boon, they don't gain one, since they are just paying for this one.
And since this is still beyond the normal power level of the spell, there has to be a balancing factor. It might be one of the following:
-They sacrifice a legendary (non-consumable) magic item.
-They lose both a 6th and an 8th level spell slot until they gain the XP for the epic boon, at which time they regain those spell slots.
-Your Strength remains at 3 until you gain the XP for the epic boon. (Might not be enough of a balance)
If the character lacks the Arcana skill or otherwise somehow doesn't know what they're doing, things might go poorly with a balancing factor like one of the following:
-The epic boon you gain is taken from someone else. The wish likely looks for an abundance of power to draw from, so we may be talking about a fiendish archmage or some unique being of power. Congratulations, you now have someone who is keenly interested in reclaiming that daily spell slot from you, and probably has the ability to locate you and come after it. If that creature dies, you lose the boon. If you die, they regain it.
-Every time you use that spell slot something unpredictable and bad happens, as the ability draws on eldritch energies to power itself. One time it might create what amounts to a mystical signal flare to the closest power-hungry extraplanar beings. Another time it might shut down the party's ability to regain HD for a week. Another time it might just center an inconvenient earthquake spell on you (as if someone else had cast it on you). And if I couldn't think of anything else, it might just smack you and everyone nearby with 9d10 unresistable necrotic damage.
Those last two sound like really fun story ideas now that I write them up. The point is that you really should be getting what you want--it's just that you have to pay for it and you may or may not be okay with the price, and you may or may not be able to choose the price--based on your skill and preparations.
I think this way of handling it preserves all the fun of what a D&D wish spell is about. It can allow for ways of safely pushing past the normal power level by trading in something of equal value. It can allow for "cursed wishes". It can allow for carefully worded language to actually do what it is intended, but without throwing off the overall balance. It can allow for whimsical seeming results to cosmically make sense. It can keep wishes tricky, without making them seem as risky as a deck of many things.