What is Marisa doing underground with a device on her back? There is an unusual scene in the opening of "The Memories of Phantasm", in which we see Kirisame Marisa with some kind of measurement or detection device on her back. Does it have a reference in any Touhou anime, manga or novel?
It is probably referencing to a Touhou game which will be later adapted into an anime in the series. 

A lot of the openings for "Memories of Phantasm" incorporate scenes from later episodes. For example, the opening of the first episode has scenes which later appeared in the next 3 episodes.

This scene:



Was in episode 2.

In the 5 openings so far there's lots of sneak previews of what appears to be references to other Touhou games: for example, Subterranean Animism and  Imperishable Night.



The scene with Marisa with a measurement devise on her back is almost certainly another reference Subterranean Animism to as the three characters shown - Nitori, Patchouli and Alice - are Marisa's partner's in the game. It is also underground which is where Subterranean Animism is set. 

Furthermore in the game, the protagonists are given a device that Yukari made:


  But others got worried, and wanted them to go down into the Underworld, with a device Yukari Yakumo made so they could talk even underground.