Ultimately D&D is about telling stories. Does the player want to tell a story about having his character lose those powers temporarily? If not, you can just say that the contract is to sow chaos or something else vague and almost impossible for an adventurer to fail at.
(Or maybe have a supernaturally evil entity simply grant the magic for free, no strings attached. Having Satan give you great power with no explanation might seem even more menacing than a conventional agreement to do evil.)
Beyond that, game rules can't fix bad roleplaying. The right answer to immersion-ruining, unfun in-game behavior is an out-of-game conversation with the player, which might need to end with "...and stay out!"