OMG! I feel for you and completely understand your circumstances. My brother who also had basenji who lived to 17 years (also is related to my basenji) had the exact situation but his B would also sometime wonder @ night and walk into the walls - then he’d be great the next few days. He even bought a doggie stroller to walk his dog around the neighborhood - this was a dog that one time ran free daily through the woods. He didn’t know what to do - it was a tough decision - you have the weigh the quality of life and what’s best for your basenji. Eventually he made the hard decision of putting his B down - oh what a very sad day - but the basenji lived a fabulous life and that’s what you have to hold onto - the fact you’ve provided your basenji the best possible life it could live. My thoughts are with you.