That's not the point. Evolution does not have a target. Evolution favors the propagation of genes. Anything that does a better job of that gets expressed into the next generation.
> Where does the certainty come that you cannot be useful in ensuring the survival of your great-grandkids, or great-great-grandkids?
I never said certainty.
The notion of diminishing returns comes to mind. Also, the percentage of great-great-grandkids genes that are yours would be about 8%, so not a lot of contribution.