* Women stop having children after 40 because it's more important to raise the children you already have. * Women don't stop having children after 40 because bearing more offspring increases your chances of survival.
Your explanation barely makes sense even on its own merits. Surely, if nature wanted us to have N children and then take care of them, it would have set a cutoff on N, rather than on the time. What if someone has no children before 40? Is it to their evolutionary advantage to care for the children they didn't have?
Or, if your explanation were true, why would women not spend ten years gestating and given birth to a healthy 10-year old? It's illogical to design a system that can pop out one baby every nine months and then say "okay now that you've had anywhere from zero to thirty children, it would be best if you stopped and took care of them.