My own cat, just once, during kitten hood, pooped in an inappropriate place, the upstairs landing. I found it when I hot home from work. I started to scold her, but the poor creature was just cowering in the corner, looking terribly ashamed and embarrassed .
I eventually realised, that was the first time I’d even seen her upstairs, without having carried her myself. I had an open-tread hardwood staircase and it turned out, she had simply reached a threshold of growth that had enabled her to climb the stairs, but not to descend again. She’d been stuck up there for hours, and she’d got caught short!
I decided to spare her embarrassment, to quietly clean it up, and never to mention it again. It was a few more weeks before she ventured upstairs again but by that time, she was able to climb back down too.