If they poop outside their litterbox on mat, how do I determine the guilty party and also why does it stochastically happen only occasionally and at night?
My family had a cat who sometimes did that. The poor little guy just missed the box sometimes. The box would be clean too and it wasn't too small for him. We think he may have not been very bright because he also never covered anything. He scratched at the side of the box or the wall. His brother always covered it for him. He was very cute though.
Just to clarify, are you asking so you can start containing the cat at night so that they only miss the box in an easy to clean room? Because trying to correct behavior only works if it's immediately after they poop on the floor, if any time passes they won't make the correct association.
How many cats do you have?
How many litter boxes do you have?
Is the litter mat kept clean and washed regularly (and not only because it was pooped on)?
There should ideally be at least 1 litter box per cat, plus 1 more to reduce the chance of stress pooping.
As others have mentioned, cats will also sometimes avoid going in a box if they perceive problems with it, eg too much/too little litter, box hasn't been scooped recently enough, etc.
Also, negative enforcement is not very effective with cats. Punishment just equals "don't do it when the human is around", unless you specifically keep watch from outside the room or something. I'm not saying it doesn't work, but be prepared to spend months on this.
I think im going to go back to the previous mat placement since I wasnmt have that issue. She's also rarely shit on the bathrug in the washroom and the litter is always kept scooped/clean and sufficient but not excessive (enough to bury it if they wish even though its sifted immediately). Something something mats, probably picked that up with her dogshit previous owner 😹