
The method they used to secure the battery/controller was to wrap it in a sealed plastic bag, something similar to this could be done for the motors. It would be more difficult since you would need a water tight bearing for the rotating shaft to exit the sealed bag. These bearings are complicated and will still always allows some small amount of leakage.
An option to help prevent water leakage would be to fill the motor with a non-conducting fluid to displace any inflowing water, something like mineral oil. I'm not going to try this with any of my motors, but it should work. There is history of using mineral oil for electronics to aid in heat transfer (used by some extreme CPU over clockers) it is non corrosive and non conductive and will not rust the metallic components.
As an alternate just letting water in seemed to work for a while, you could prolong motor life, by ensuring the internals were thoroughly dried after removing them from the water. This would most likely involve opening the housing and a dry air flush. This would slow the rusting, which is much faster when water is combined with exposure to the oxygen present in air.
EDIT
Another method that could be used with actual Lego parts, use the Lego magnets to couple two shafts rotation together on either side of the plastic bag around the motor, this should have zero leakage. There would be an upper limit on the torque possible before the magnets would slip and it would potentially cause wear onto the plastic bag if there is contact with the moving parts.