There are places that use a machine called a Megaflush (I think thats what it is called) and this attaches to the pipes and literally sucks the old stuff out, flushes the system and refills it.
Be aware of 'New Fluid Syndrome' with this method.....this is were new ATF (which is a good detergent) strips clean and dislodges all the harmless crud lodged in nocks and crannies in the box and dumps it into the new fluid.
It is safer to change the fkuid, refill and then change it again and again.....this dilution will eventually replace the old fluid.
In the case of water contamination, it would be best to have the system flushed and a new filter fitted.