This episode plays out all the more hilariously because of the audience's knowledge of the reality behind their discovery of the skull they used in Hamlet. Not only does it allow us to enjoy the story-specific humour throughout the episode but it includes one of the long running jokes that is a thread throughout the entire series: the somewhat reluctant onset of "a certain age" - as demonstrated by their complete memory lapse regarding their production of Hamlet and counterpointed by their childish energy for a murder mystery adventure.
I considered how the episode might have played out had they put the introductory childhood scene just before the brothers realise their mistake. Not only would the laughter be minimalised to a single punchline but it would preclude any connection the audience could make to the joke. The punchline, as hilarious as it might be, would fade to a catalogue of mediocre examples.
Deathtrap is one of my favourite episodes, if only for the dawning realisation on Frasier and Niles' faces when they find the Hamlet and the dreams of long-awaited prestige and renown that play out in Frasier's mind during the episode - believing that, following their masterful investigation into the "murder", they will be in hot demand for the series of books they wrote when they were adolescents.