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? ;)
Here we improve the trains to emit less heat and immediately spend it on air conditioning.
In the meantime the debt (tunnel excess heat) continues to rise and somebody else in the future will have to pay for it.
Their overall limit of heat output by the trains remains the same. The tunnels won't be any hotter than they are now, thanks to savings found in other systems.
The tunnels are getting hotter and hotter. Saying "the tunnels won't be any hotter" is completely unfounded in reality.
I know heat inside the tunnels fluctuates with time of year, but I can't tell if year-on-year the tunnels are getting e.g. 1xx% hotter and, critically, what the causes are (more tph will obviously, global warming will, more pax will).