Technically, you could just pump out hot water and pump in some cold water, on every station.
But achieving reliable coupling between the train and any kind of piping system would be complex. Remember, there is electricity involved already and you don't want to mix leaking pipes and electricity.
When you realise you have to do something very reliably on every train stop, on every car a more passive solution like piping cold water through the rock might be cheaper long term.
I'm not sure you'd actually need to have physical coupling from the train to the platform. Train lavatories used to just dump their contents out of the track. Given that tube trains are already required to stop at a very precise location on the platform, perhaps the hot water could just be dumped into a funnel built into the ground underneath the track beneath the rails.
Getting cold water onto the train would be harder. Perhaps a big funnel on the top of the train underneath a pipe? ;)