Genes that contribute to intergenerational success can/will, be naturally selected for. That is how multi-generational families evolved in the first place.
This in turn will favor genes that promote longetivity. But note that it is an indirect process and, thus, a slower one.
Also, when resources are scarce, there is a tension between keeping oneself alive and helping the younger one survive. Remember it is the gene that is selfish not the organism. If the gene fairs better by scaraficing the organism in favor of younger organisms with the same gene, then you get what appears to be altruism.