This is how diesel-electric locomotives work too.
edit: Thanks for the correction. They do indeed use resistors and just dump the energy as heat. Unfortunate.
Hopefully this will change as supercaps continue to improve. Maxwell tech's modules are already used in light rail, and looks like some work towards smaller locomotives in Switzerland here:
Dynamic brake