As it turns out, as explained by the below video (here’s a direct link, 10 minutes long), the NES and SNES have very similar control setups. Both controller ports have seven lines, and both read them using a shift register that can be used to read arbitrary numbers of buttons. The SNES basically just has more buttons to read.
Due to this, there’s homebrew NES software that’s made to use the SNES mouse, and even emulators that will convert your PC’s mouse into simulated SNES mouse signals, which will be fed into the emulated NES and the software running thereon. (It isn’t all buttons, but it sends the displacement as a binary number.)
The video comes to us from the account of CutterCross, who’s making CrossPaint, an NES art program that uses the SNES mouse. A demo can be gotten from itch.io.