Developers are not paramedics, our jobs should not require instant availability and the systems should be stable. There is a difference between being productive and being available for random unplanned bullshit.
Even though CVs don't (at least in my country) have DoB you can infer it from years in education. You might not even get a chance for an interview to say "I never want kids, I just want to work hard".
Let's pretend all jobs are like this, where flexibility pays more, if you do ever plan on having kids, could you afford and would you be willing to take a big pay cut so you can spend time with them?
In any case, we can’t function as a society by limiting everyone’s opportunities because someone might be discriminatory. We need to address the discrimination, and we’ve made great strides as a society.
I know a number of people who have done just that - taken a big pay cut - to spend more time with kids. And why shouldn't that be the case? Less work => less pay.
For whatever reason, employers seem to value this for certain roles, and they often pay a premium for it. This is a Good Thing for people who value money over flexibility; why lock them out of a natural fit? Perhaps you would argue that this isn't good for them, but surely they should be free to make the choice? For those who value flexibility over money, they shouldn't take those jobs. As long as expectations are communicated, there shouldn't be a problem.
Maybe this isn't a real problem, but I want to address it just in case: I'm concerned that some people may feel entitled to a high low-flexibility salary _and_ high flexibility. This sort of entitlement comes up often, and as far as I can tell, it fundamentally ignores economic realities. In other words, if these things are compatible, then proponents need to explain themselves (and provide a lot of support for their arguments) because it's far from obvious.