Question: Consider someone who believes in any kind of reincarnation or perfect punishment after death, a theist. That is, all she/he does in this life is done in light of complying with her/his God(s) wishes.

Is it possible for a person like this to be genuinely selfless in the sense of leaving a better world for future generations for their own sake? If so, how?

I don't see what could prevent this hypothetical person from being selfish all his/her life, knowing that the burden will exist only for future generations and not for himself/herself.

\*
\*
\*

NOTE: this is a provocative post, meant to point that this community
moderator deemed this post NOT offensive "[Why should an atheist care about what happens to the world after his/her death?](https://philosophy.stackexchange.com/questions/94177/why-should-an-atheist-care-about-what-happens-to-the-world-after-his-her-death?noredirect=1&lq=1)" but finds offensive to make counterpoints to it.

Answer: 
If we agree on the premise that there's no reason for an atheist to care what happens after their death, then the corollary to that claim is that theists do care about it only because they are **afraid to be punished** in the next life or hell. Which is indeed far from selfless.

If you promise a theist a guaranteed reward or punishment after death (to take out the religion-related self-interest out), they have exactly the same reasons to care for others as atheists. Either you accept that both theists and atheists may have such reasons, or you deny selflessness to both.

In other words, true selflessness is above religion and cannot be substituted by a religious belief.
I suppose a theist could care for much the same reason that an atheist would care, because caring derives more benefit than harm for them selves.

I do not believe in "selfless acts" (outside of accident) as any selfless act provides benefit to the person committing the act, even if that benefit is just the internal knowledge that they did the right thing. Caring about others and future generations can derive more benefit in the form of internal peace/dopamine/ability sleep/ whatever you want to call it, than the alternative of acting in a selfish way that provides more material benefit.