Theoretically, you can lift water about 14 feet. In reality, you can lift it about 10 feet. Efficiency drops as draft increases. Tolerances have to be tighter also.
So, you build a series of pumps lifting to higher and higher levels. As others have pointed out, though, it's not the pumps themselves which stop working when flooded; it's their power source that has stopped working thanks to flooding. Their electrical generators are flooded, and it is these which could have been located above the flood zone. The pumps could have continued to work - or anyway could have been built to have worked - while submerged, if planners had considered the problem.
Yeah. If the pumps were located above sea level, then you'd still need other massive pumps below the water level just to prime the higher pumps. That's not a very sensible way to build plumbing.