Maintaining a pipe, even one a half-mile long, is pretty cheap. (It has floats along its length, so it doesn't need to be especially strong.) Probably the biggest maintenance chore is keeping the intake from being fouled with barnacles, something most easily handled by replacing linings periodically.
Water at 40m depth has a different pressure than at the surface level. Pumping at the surface and releasing at depth will have significant water pressure difference.
(A quick Google later). At 40m, it's 5atm or roughly 75psi pressure.
(Another quick Google). Oil pipelines run at a higher order of magnitude as that, so it's doable but would return energy, increasing as you go deeper.
You do not need to get the water at the surface to 10, or 100, or 1000 atm. You just need a long pipe that goes all the way to the bottom.
Likewise for transporting water upward.