Midwifes have to make the correct decisions in a stressful situation in an extremely tight time period (seconds to minutes when it's the business end of things, so to speak), with limited information (no heartbeat readings at the end, can't see what's happening, just feel). Mother is screaming at the top of her lungs, partner has no idea what's going on (presuming not same sex). I seriously can't think of any job where the pressure is so intense for every single day of work, without exception. Maybe in triage, but that'd be about it.
A water treatment worker checks that various readings are within limits, and makes adjustments according to a set of standard operating procedures (presuming here, to be fair). I'd also presume there'd be a good number of check points during the journey of dam water to the final product in the pipes. There's no redundancy with midwifery that I can see.
If we ignore the risk aspect to third-party which parent and grand parent comment brought up, and instead focus on pressure, I can think of a few ones which might be worse than midwife and with lower pay. Highway road workers would be one. Having trucks going by in almost highway speed just meters next to you while you are focusing on the work is the kind of hell on earth that I would not want to expose myself to, and it doesn't even pay well.
Other high pressure jobs on the top of my head would be rescue swimmer, as the profession require careful psychoanalytical pressure testing to enter the training program. It also takes a special kind of person to work as a explosive chemist or at the bomb squad. I would also mention the military as an natural example of high pressure job. Each three has widely different degree of compensation compared to each other and even within the professions itself, and compared to midwifery it is all over the place.
There is no clean formula for X(Pressure) * Y(Third-party risk) = Z(Pay), and implementing one would change the compensation for a wast number of professions. I strongly doubt that midwifery would be the one that would see the biggest effect, but I would love to see a study exploring it.
Personal risk is a bit different because everyone has a choice about what is acceptable for them. Risk to others should not be your choice. The responsibility should be fixed and defined and therefore it's probably easier to make logical arguments about compensation rates.