At some point, both urinary and fecal (bowel) incontinence affect most people with dementia as brain-body communications deteriorate. Diet can influence the types of stools you have to deal with.
Foods that add to the problem (by relaxing the anal sphincter or irritating the bowels):
Cured or smoked meat
Fatty or greasy foods
Foods that help (by bulking stool and being soft and easy to consume):