Put it at the very end of a sequence, after the main action has finished and the next scene is about to begin. Pair it with a low boom first to set up the payoff, then follow it with a fail sound so the edit moves from setup to punchline to reaction without losing momentum.