Since it's a bit of a "xxxxx" to gain access to your motor, a quick 'n' dirty solution might be this...
Snip the wires that connect to the motor, then insert a 2-way, 15amp connector block (as per the attached sketch). Reconnect both wires and at the same time insert the suppression capacitor. Try to have it that the terminal block / capacitor assembly is as close to the motor as possible.
This is probably not the most elegant method, but it should get you out the poop.
The capacitor, by the way, can be any value between, say, 10nF and 100nF (0.01uF ~ 0.1uF). Just to clarify any confusion, it may have a number printed on the actual body. If it's a 0.01uF cap it will have '103'. If it's a 0.1uF it will have '104'. Be sure that its voltage rating is at least 25% more than your battery supply.
As an aside, if may prove sagacious to include two more caps' with a value of 0.01uF. Solder the first one between the blue terminal and the actual motor body. Solder the second between the yellow terminal and motor body.
This, however, may be a moot point since you're having trouble getting good access. Fortunately, you may find that just the one cap - as seen in the sketch - will cure the fault.
Good luck.