The only way to do it is to make sure the litter box is in a location the dogs can't get to because of their size (vs the size of the cat) don't know if that will work for your smaller dog, though).
If you have a utility room, you might be able to keep the litter box there and put a cat door in the door.
Some people use litter boxes with covers, but quite a few cats don't like them (they keep odor down for humans, but it can easily build up inside, then kitty doesn't want to use the box because it smells too stong, and out-of-box problems develop).
A friend of mine keeps her multiple dogs out of her cats' food by putting the food up on an elevated surface. It would be tough for a litter box, but you might have some space where that's doable.
How are Minnie and Cosmo doing?