3 actually isn't old for a betta, it's barely middle age, but if you got him from a national pet chain, they're often mass need (betta equivalent of a puppy mill) and longevity is not a priority for those breeders. So it's possible it's just in his genetics to have his little body shut down early.
Maybe see if he'll eat peas? If he's not eating pellets you need something else, the
bloodworms will cause constipation. Or
daphnia, that's closer to his natural diet, but while everyone I know says their bettas love it, I've never had one that would eat it.
I'd recommend leaving him in the
breeder box for now. If he's having trouble swimming, that'll help keep him comfortable. If it's just his age, anything to keep him comfortable is the priority in my opinion.
It is really sad, I hope he bounces back, but if he doesn't, it seems like he had a wonderful life with someone who cared deeply about him. A 10 gallon all to himself, a very knowledgeable and responsible owner, I mean, he was definitely spoiled and treated well. No matter what at this point, judging by this thread, I feel like you've done right by him.
Please continue to keep us updated on how he's doing.