Is there a name for this literary technique?

It’s not exactly first person narrative. For want of a better label I think of it as double first person. It happens when a first person narrator describes how someone else told him a story, the major part of the text is one long quote from the other guy.

An example is H.G. Wells’ The Time Machine. An unnamed narrator describes how he met the unnamed Time Traveller at his club. After some discussion of the principles of time travel, the Time Traveller then recounts his adventures. From the first words of chapter 3, until nearly the end of the novel, it’s the Time Traveller speaking, And all of the paragraphs are in quote marks.

Another example is the Sherlock Holmes story, The Musgrave Ritual, it is narrated by Doctor Watson, but consists almost entirely of Holmes recounting one of his early adventures.

Does it have a name?

It’s a frame story/tale/narrative. At least, that’s the term I’ve always heard. Heart of Darkness and The Turn of the Screw are famous examples.

Yup. Frame tale. Frankenstein, a lot of Maugham’s stories, Wuthering heights. A staple of 19th century Brit Lit.