Yikes, that's tough! I always first suggest a vet visit to make sure the bathroom issue isn't medical. If the kitty happens to be declawed, I'd also get paws x-rayed as bone re-growth can cause pain when digging in the litterbox and lead to avoidance.
Then if an animal behaviorist is an option, I would go that route!
My cat overgroomed creating bald spots when he was first brought to the shelter (and it continued to be a problem until he was settled in my home for a few months) due to anxiety. Have they had any "big" changes recently? New work schedule for the human(s)... new unfamiliar litterbox for the cat... I once helped out someone where the issue ended up being that they had added a fancy scented plugin near the litterbox (that sprayed every hour or so) and the cat was terrified of it!
While I'm not a huge fan of medicating for behavioral issues: In the beginning my cat received (prescription required) Flouxetine - which is typically considered an OCD/Separation Anxiety drug - but it really benefited him. After awhile, we went "down" a step with Anxitane - it's an inexpensive, chewable over-the-counter calming med that comes in a treat form. Typically suggestion is 1/2 treat 2x daily. This one is effective in like 95% of cats and dogs and relieves anxiety without causing drowsiness in the cat.
At this point, my cat manages with a consistent schedule with lots of mental stimulation (a couple daily play sessions, puzzle feeders for all dry food and treats - and sometimes we do a small Kong for wet food too) and a very clean litterbox (plus an optional second litterbox in a different part of the home).
#PetHealthandNutrition