It was the Roman Playwright Terence (thank you, google) who said moderation in all things. I would add to this a simple rejoinder: except for moderation itself, which should be enjoyed in excess.
Dog food is specifically designed to meet canine nutritional needs. Cats’ needs are very different from those of their canine counterparts. Cats who are fed exclusive diets of dog food inevitably develop nutritional deficiencies. They are particularly likely to suffer from a heart condition called cardiomyopathy that is linked to low amounts of taurine (an amino acid) in dog food.
That said, humans who attempt to subsist exclusively on ice cream can expect to develop a plethora of health problems. (Imagine the heart problems we would have!) Ice cream is not a healthy food. But we can get away with eating ice cream now and then if our diets are otherwise healthy.
In my experience, the same is true of cats eating dog food (and vice versa). Dog food is in no way good for cats. If your cat develops gastrointestinal upset or other issues each time he digs into the dog food then you must be strict about keeping him out of it. However, in general it won’t harm a cat to eat small amounts of dog food at infrequent intervals.
Photo: Cats can eat ice cream now and then, too.