FIRST: Nobarkus is spot on, take him to the vet and get a full blood panel - it could be a thyroid problem. There are a few threads explaining this on the forum
IT sounds like there are some serious training mishaps that happened along the way with this dog. Remember that your stress about the situation does transfer to the dog, so if you want to make significant changes in his behavior you need to sit down and see how you guys have molded him the past 5 years. For example: When he was growing up, did you allow him to always sleep in the bed with you and never sleep alone?? If so, you can't fault him for eliminating all over the floor because he wasn't trained to sleep with out you two. That's not fair, and he will not understand why you are angry at his actions because in his mind, all his past history tells him he sleeps with the pack, not being with the pack all of a sudden is scary, even for one night. Finding solutions to your dog problems usually needs to start with reflection on how he learned the behavior - when did it start, what is happening when the dog does something you don't like etc.
At 5 years old, I'm certain you could ease the anxiety but I would be very surprised if you could make it go away completely. He sounds like he needs to be re-crate trained, but keep in mind some Basenjis never accept crating later on in life and need other accommodations (ie, an x pen, or doggie daycare)A DAP defuser or collar could help, you can order them online or ask your vet. I completely agree that exercise can GREATLY reduce the stress your dog feels when he is alone, primarily because he is tired. If you have the time and the resources you might consider adopting a female buddy for him to play with him and keep him company. Go and get "I'll be Home Soon" a book about separation anxiety - in fact brushing up on some dog behavior literature works wonders in communicating with your dog and modifying his behavior because you BOTH understand each other better (Patricia B. McConnell has many excellent books).