Obviously, before deciding to trap you agree with the risk of discounting your hand from the strongest preflop to a mediocre or a weak hand postflop. So upon agreeing on this risk, you also automatically understand that there are flops and actions on flop which signify that you're beaten. You have to accept it right away, even before setting a trap, and be ready to give up under certain conditions. If you can't give up on AA with circumstances being not in your favour, then don't trap.
Also you have to clearly understand why are you trapping, normally you need to have good reasons to do so. If you're at the table of calling stations and it's a deep stack stage of a tournament, limping with pocket aces is a losing strategy.