Interesting twist on this I heard today on the Making Sense Podcast with Will MacAskill. According to this, the attribution to John Stuart Mill is correct
What has posterity ever done for us?
https://quoteinvestigator.com/2018/05/09/posterity-ever/
It was around the last half hour or so, where they were considering what values we need to maintain to preserve something like the culture we have, while also knowing that we are most likely maintaining some wrong headed values. We still haven’t really shaken off slavery, so what else are we doing that is antithetical to the happiness of others.
How much should we consider the needs and desires of those yet unborn? Seems like a lot of people think it’s fine to use up all the resources we have and let those future people figure out the problems we leave them.