Put it on the cut where the mistake is revealed, after a brief build-up, then let the scene breathe before the next gag. For a longer fail sequence, lead in with the Dramatic Dun Dun Dun Sound Effect and finish with the SpongeBob Fail Sound Effect for a second, smaller payoff.