I've been playing with Supermodel for the past week or so getting it set up with dual lightguns and raw input. When set up correctly it works really well, so kudos to the dev team. The issue is it's impossible to keep it set up correctly due to the way USB devices are enumerated on Windows.
I can see from the code that Supermodel enumerates the devices in the order Windows returns them, and they get assigned an integer number, and I think that's it. If the enumerated number matches the mouse number in Supermodel.ini then it's great but once the enumeration changes you need to determine the new numbering and update the ini - ~16 different config lines across the three two player games.
MAME works the same way as Supermodel in the vanilla setup, but it has a 'mapdevice' capability to map the device PID to a specific Mouse index (though it's called a guncode in Mame terminology). The MAME docs describe their solution here.
This is a really common problem for Lightgun fans, but I see most of the support requests around this are people trying to find workarounds on other forums, I didn't see anyone chiming in here to ask if this could be implemented by the project maintainers. I'm not a C++ dev, so can't contribute directly, but thanks for the consideration. If it's preferred for someone else to contribute changes I can try to find support elsewhere. I think there is a lot more interest in this in the community at large with the new Sinden Lightguns, but this would help users with IR Lightguns like Aimtraks/Wiimotes too.