As far as i know, good parent-infant attachment is critical in shaping stable adults with good emotional regulation(because in this attachment process the baby learns how to regulate his own emotions) , and that emotional regulation is critical in good delay gratification(i.e. passing the marshmallow test).
We also know that stress while a mother is pregnant affects the epi-genes of an unborn kid, making him more susceptible to stress - which again delay gratification harder.
We also know from research that depression has a direct impact on negative attachment between mother and baby. We also know that poverty tend to increase depression and stress a great deal - it's just common sense.
In the same vane, we know quite a lot of other things on how to greatly increase the likelihood of creating mentally stable persons who have good delay gratification. Psychologists haven't been resting all these years, you know.