How can I rearrange this plumbing to drain correctly?
I'd say the standpipe is a bit short, though I think 24" is minimum code. If the p-trap is clear, then possible issues:


there's a clog further downstream
the cat toilet is simply expelling too much water too fast 
the vent stack is plugged


It's not a great fix, but one potential solution is to install a wash basin and connect that to the p-trap instead. Then have the cat toilet dump into the sink. That way the wash basin can completely fill and slowly drain.