I'm at work so I can't reference my actual Mame files, but I've had problems like this and I know roughly how it works. I also use an aimtrak gun.
FYI If I remember correctly, "Input (General)" controls get saved to CFG/default.cfg, and "input (this Game)" controls get saved to CFG/[game-name].cfg
There are two main problems with the mame key/axis binding system imo, one or both may be happening to you:
#1:) Mame enumerates joysticks and mice each time you run the executable, and if you have plugged or unplugged usb devices, or restarted your computer, anything you have bound in mame involving a joystick or analog axis may no longer be valid. For instance, if you set up an axis in mame it might report to you that you have set it to "JOY 2 -XAXIS". The next day, you might discover it no longer works. You rebind the axis, and this time mame will tell you it is "JOY 1 -XAXIS".. even though you are using the exact same controller. Joysticks numbers in mame will change with any change to usb devices, and even after a windows restart. It is extremely frustrating.

Keyboard keys are not affected by this, so any opportunity you have to use a keyboard button(ipac etc) instead of an axis is one you should take if you want universal controls. Obviously, for aimtrak this is not an option.
One solution to this problem is to never plug or unplug usb controllers of any kind, and never change the ports/hubs you may have them connected to. And just pray that Windows reports them to mame in the same order each time...which it usually will, but not always

, if like I said if you never change any of your usb ports.
The best solution to this is some software called ContollerRemap for mame. It is a pain to setup(involves manual xml file editing), but once your done it solves this problem permanently:
http://forum.arcadecontrols.com/index.php?topic=108767.0#2:) The other issue is that if you EVER re-map a key in "Input (this game"), Mame will never let you revert back to the default "Input(general)" until you manually go in and delete the cfg/[game-name].cfg file. Even if you go into "Input (this game)" and delete the key you just binded so it says "none", mame will not default back to the "general" keys you set until you delete the file. You might be able to go into the cfg/[game-name].cfg file and try to delete the specific binding that conflicts, but the only reliable way I've found is delete the file.
Summing it all up; the only way I was able to use a universal set of controllers/axes for all games(including light gun) was to use ControllerRemap, and to never set anything in "Input (this game)". If there is any easier way, I'd love to hear it.
Anyways..hope that helps at least a little bit.