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.
The world is like a house that's inherited by future generations. The house will be affected by the wear and tear of each generation so the idea of making the world "better" for the next generation is pointless, since what is best is not the same from one generation to another. The best that can be hoped for is that each generation use and care for the house responsibly so each future generation has a decent place to live.

I dont see any religious belief including atheism that is contrary to this simple idea.