To avoid corrupting your game with an Action Replay in the first place, follow a few simple rules:
Even if your game does get corrupted, it usually won't wipe everything. You can typically load an earlier save from before the corruption happened. The exception is a fake or bad code, which can cause more serious problems. And if the Action Replay device itself stops working, you may simply need a new one—but the priority is protecting your game from corruption. Be cautious, and only use codes you're confident will work.