Hello
IMHO there is a big difference between water flowing (both free and pipe) in a cave and aquifers percolating through ground. It shouldn’t be the same waterway value as it’s two different flowing regimes.
waterway=underground mixes too much the flow and its container, and conflicts with canals in tunnels, underground pipelines
The problem may be looking to mix too much things in a single key. It’s important to consider the flow in one hand and its container on the other to get a simpler solution.