Put it after a moment of rising tension, following sudden suspense and before the visible failure, then follow it with cartoon slip as the plan collapses. That order gives the reaction a clear target, keeps the joke focused on one failed idea, and leaves room for a short visual punchline afterwards.