Hello and thank you for asking your question on just answer. My name isXXXXX will try to help.
The cat food, is meat based where as the dog food is plant and meat based. So, the cat feces, with the extra protein, tastes good to the dogs. My own dogs try to get in the litter box as well.
You have a few options.
I put a baby gate up so the dogs can not get to the litter box.
You can purchase a "litter maid" self cleaning litter box. This is self cleaning litter box that has a rake that scoops the waste into a plastic container after the cat goes.
You can put a powder in the cats food that makes his stool taste bad to the dogs.
The most commonly used one is called "forbid."
You can purchase it at amazon.com www.amazon.com/Alpar-Forbid-12pkts/dp/B00061MRWC
You can put the litter box somewhere that he can not get into or up high.
Yes, the litter will cause digestive problems. I have seen it cause constipation, abdominal pain, and blood in the stool as it is abrasive as it moves through the gastrointestinal tract.
In my experience, the best thing to do is to put the litter box in a place the dog can not get to or block off the area with a baby gate.
I hope this helps.