Geordie lad, that's a damn fine question. But how to answer without recourse to an itsy-bitsy bit of techo' isn't easy. So hang in there for a minute...
The reason for the capacitors in the first place, as you know already, is to clip (suppress) any high-voltage spikes from getting into your RC system. Those unwanted spikes usually originate from an inductive source (in this case, the motor) and can manifest itself in the form of unwanted servo jitter (among a myriad other nasties).
Agreed so far?
So in order to counter those effects, designers of radio equipment, digital equipment, etc., usually locate the capacitors as close to the source of interference as mechanically possible. In effect, any unwanted voltage spikes are suppressed before they can travel along the motor wires and get into the radio system. Leastways, that's the theory.
But, like you, I too have had concern on several occassions where I've been a tad worried of soldering the caps' directly to the motor body. I'm no engineer, so I'm not sure just how much heat those motors will handle before causing irrepairabe damage. And some of 'em need a LOT of heat before the body gets hot enough to allow you to make a sound solder connection. Spooky.
So here's the deal...
In most cases those capacitors can indeed be located away from the motor. If you have room inside your ESC, stick 'em there. Or you could even solder them directly across the wires feeding the motor - at any position along their length.
But this is where my vocabulary (or lack of) lets me down. I'm useless at explaining these things. A picture speaks more words, so maybe this sketch might help.
Just for the record, I have been known to install motors without ANY capacitors... without the slightest hitch, glitch, burp or fart. But don't let that fool you into a false sense of security. In other words, its best to keep those caps' there. But don't put too much emphasis on sticking them on the motor. As long as you stick them SOMEWHERE in the wiring, then, 99% of the time, you can rest assured that you're system is well suppressed.
PS...
Was just about to hit 'send' when Wombat's reply came in, which pretty much says it all. But don't forget to take into account the voltage rating of the caps. Your chaps over at ESR have what you need.