If you mess with anal glands, they lose their elasticity and then they need to be expressed all the time, because the dog will lose the ability to do it on his own. Anal glands need to squirt with every bowel movement.
If the dog does not get enough exercise or the poops are too soft, they can't do this, and then the secretions become too thick.
We had some problems when Hans had loose stools.
I had excellent success with a product called Anal Glandz.
You put some drops in warm water, dip a cotton cosmetic oval in the solution, and hold the warm compress to the butt for as long as the dog will let you.
The solution softens the secretions and helps them get it out.
Feeding bones such as turkey necks also helps.