I'm afraid I only have hardware solutions. You can get Wiimote grips with a shoulder button that presses the B trigger. But you would still need to rotate it round for the first-person scanning and exploration sections.
The controller I use for this game (and Super Paper Mario and Wario Land: Shake It/Dimension) is the one being modelled by my cat avatar - the Retro Classic Controller / Interworks Controller Pro U - it looks like a Wii U Pro Controller that has eaten a SNES controller and toggles between acting as a Wii (NOT U) Classic Controller Pro (i.e. with digital shoulder buttons) and a Wiimote, either sideways or upright. The sticks are not great, and the A and B in Wiimote mode are still A & B, so the primary buttons for Other M are X & Y. But it actually works really well for games with NES-style controls, and retains the IR camera at the top so I can just point it at the screen to activate first person aiming.
Beware! There are also very similar-looking knockoff Wii U Pro Controllers that don't have the mode switches (but do still have the non-functional IR window…), but these won't work for our use case.
Modded mine with an N64 d-pad (less pointy corners) and the SNES-coloured buttons from the WUPC one I got by mistake: