A species doesn't really need to be "useful" in order to survive. It just needs to reproduce or continue living. We haven't stopped reproducing as a species. I can't imagine a future where humans decide to let ourselves die out just because we've built lots of amazing machines that take care of all of our needs.
> Only a few will survive, supported by technology that they no longer understand.
I think the human population might shrink to somewhere around 10-100 million over the next 10,000 years. It's hard to conceptualize, but humans were around 10,000 years ago, and we'll be around 10,000 years from now.
I personally believe that we're heading towards a utopian future, although there will be a lot of serious bumps along the way. Maybe we'll agree to maintain a population of 10 million humans on earth, and there will be many more living on interstellar arks that are slowly heading towards distant planets. We will have achieved immortality, so the birth rate will be very close to zero.