I read a lot of science fiction of random quality and length[1], and there's enough of a scattershot of ideas that an expansive humanity and humans dying off are not entirely uncommon ideas, so I've had reason to think about it fairly often. While I understand a lot of people might be upset at the idea humanity dying off, being a father myself and the understanding that while I can't stick around to experience everything myself, part of what I am (in the *intellectual sense more importantly than the biological one) continues on in part through my children (one of which is not biological, but just as much a continuation in the same sense).
That we might engineer our own obsolescence is scary, but so is the knowledge that we all die. Similar to in our individual lives, I find some comfort that in my old age I might be taken care of by my legacy.
Also, using humans for batteries is stupid. There's plenty of better reasons possible and that have been put forth for that plot point. That's just low hanging fruit for nerds. ;)
1: https://www.reddit.com/r/HFY/ - If you don't know what this is and you like science fiction, you're in for a treat. Check the sidebar for quality classics.