Some years back, I read an article about sexism in India and how first born male children were fed slightly better, taken to the doctor slightly quicker, etc. The outcome could be measured in terms of higher death rates for daughters.
I am not talking about girls being beaten, starved or otherwise abused. I am talking about, for example, boys being taken to the doctor in the evening, girls being given a "wait and see" attitude where they get taken the next morning if they aren't better.
Just getting a child to live to adulthood takes substantial commitment of resources. There are a billion different ways that parents can fuck a child over completely without trying to do so and with no malice aforethought.
Most people who cannot make their lives work had multiple seriously bad things happen to them as children. This is not a case of "If you just try hard enough, you can readily put that behind you." If you aren't in prison, homeless, a junkie, dead, etc, a lot of things went right right in your life that are completely outside of your control.
This does not negate the effort it takes to make life work. But if you think you are the greatest thing since sliced bread, you are taking credit for a helluva lot of stuff you had no control over at all.
The incredibly good health that so many modern peoples enjoy which has been generally extending human life arises out of a long human history of progress and development and depends on enormous amounts of infrastructure and public resources that are basically "gifts" to us from the world. People really shouldn't go taking that for granted as some baseline given. It really is not. It doesn't take that much for a person's life to come completely unraveled. Once that happens, putting it back to together is generally a lot harder than taking it apart was.
All traits are heritable.