Place it just after the scare in your edit, following a sudden suspense cue and before the reaction settles, then follow it with an oh my god wow moment to close the gag. That order keeps the scare beat in the middle, where viewers expect the joke to land.