I adopted my second dog as an adult from the pound.
Since I didn't know how he would be around cats, I took no chances.
For the first week, I had him on leash, attached to me at all times. If I was watching TV, I kept the leash around my ankle!
After that week, when he showed no sign of aggression towards the cats, I let him on a loose leash in the house. So he wasn't attached to me, but had the leash dragging behind him so I could grab it if I needed to.
After about a week or so of that, I let him totally loose in the house.
But, for about the first 3 months that I had him, whenever I left the house, even if for a few minutes to run to the store, I kept the cats safely locked up in the bedroom!
The litterbox issue (I call them kitty roca!), I solved that one a while ago. I have a laundry room where I keep the litter boxes. I cut a catdoor in the door to the laundry room so the cats can go in and out, but the dogs can't. Plus, it gives the cats a "dog free zone"