If the rock and the water table cooperate, wells and horizontal tunnels can be hundreds of meters deep and tens of kilometers long. Many of these Qanats were built thousands of years ago, using iron-age technology: If the rock and the water table cooperate, wells and horizontal tunnels can be hundreds of meters deep and tens of kilometers long. Many of these https://en.wikipedia.org/wiki/Qanatqanats were built thousands of years ago, using iron-age technology.
Here are a couple examples, from China and Iran:
https://en.wikipedia.org/wiki/Turpan_water_systemChina
The latter claims that: This Qanat is 33 km longThis Qanat is 33 km long, which consists of two original branches known as Qasabe and Doolaab, which it consists of 427 deep wells. Digging such a huge tunnel with the master well of 340 m deep and over 73 million m3 excavation in 300 m deepwith the master well of 340 m deep and over 73 million m$^3$ excavation in 300 m deep....