Place it right after the failed moment in your edit, once the reaction is already visible on screen. Follow it with Sad Trombone to stretch the joke, then cut to Sitcom Laugh Track when the joke needs a lighter finish.