We have had problems with anal swelling and infection.
What has worked for us is cleaning back there with Vetericyn after each bowel movement, then applying a very tiny amount of Penaten cream.
You can find both on Amazon.
Before this regimen, the vet prescribed NeoPredef powder to cure the infection.
It is extremely important to keep the anal area disinfected so that the dog doesn't feel itching or pain. Putting on a collar just seems cruel, if you are not also eliminating the source of the dog's discomfort.