Xeno's are awesome. I've been keeping cichlids since I was a boy, and Tanganyikans exclusively for 20+ years, and the sand floor biotope Tanganyikans are amongst my favourites.
Xenotilapia are a diverse group of fishes, so except for their rather exacting maintenance requirements, it is difficult to make generalizations about them. The genus contains maternal mouthbrooders, biparental mouthbrooders, sand floor inhabitants, open water fishes, sexually dimorphic species, monomorphic species, schooling fishes that employ a lek mating system, and species that form stable pair bonds. Can this possibly be one genus? Probably not, in my opinion, but we'll have to wait for the taxonomy to catch up with the biology.
As for general maintenance, these fishes require careful attention to three main areas- (1) water chemistry, (2) diet, and (3) tank setup, as follows.
(1) Water chemistry. All Tanganyikans require hard, alkaline water, but
Xeno's are particularly demanding in that they are very sensitive to
any changes in water chemistry. It goes without saying that appropriate nitrogen cycle management is a must, but they are also very sensitive to changes in both pH and temperature. Frequent water changes, and a substrate with ample buffering capacity are essential.
(2) Diet.
Xeno's are omnivores, but they have long digestive tracts, and do poorly on a high-protein diet. They are also
very sensitive to intestinal overloading, so are best fed in multiple small aliquots each day. My Xeno's get spirulina flakes for 60-70% of their diet, supplemented with plankton flakes and frozen foods.
(3) Tank Setup.
Xeno's are delicate, and they are skittish. If their tank is located in a high-traffic area, they may damage themselves as they thrash about whenever disturbed. They also panic when the lights are turned on and off suddenly, so lights with timer/dimmer programming are very useful, and obviously, their tanks need to be tightly covered. A sandy substrate, numerous hiding places, and broken sight lines are useful, as you mentioned previously. And very carefully chosen tankmates.
Will they be content in a 40B? The short answer is- I don't know. I am currently keeping
Xenotilapia singularis, X. bathyphilus, X. flavipinnis, X. papilio, X. spilopterus, and
Enantiopus kilesa, but I've never kept any of my colonies in tanks smaller than 60" x 18", and most of them are larger than that. That said, I don't think a 40B would be large enough for the sand floor lek breeders (
X. singularis, E. kilesa). However, it might work for the deep-water,
X. bathyphilus, a maternal mouthbrooder that is quite peaceful. It might also work for a small colony of the biparental mouthbrooder
X. flavipinnis once they pair off. I wouldn't even consider trying this with
X. spilopterus (an open-water fish that needs more space), or
X. papilio (too delicate and expensive for an experiment).
Two points to finish. First, you mentioned that you didn't want to go to a 60" tank, but even a 48" x 18" x 20" tank will give you more options than a 40B. Second, don't let this post discourage you: keeping and breeding
Xeno's is not rocket science, but you must be prepared to consistently attend to their needs, and for this you will be amply rewarded. Good luck!
A few favourites;
Enantiopus kilesa-
Xenotilapia singularis-