i think the other suggestions are more likely. but...
there is a condition known as "stud tail". clinically called supracaudal hyperplasia. it's caused by an overactive gland at the base of the tail. most common in unaltered males but possible in any dog.
my boy started having very similar symptoms around 1.5yo... bald spots. crusty patches. inflammation. black heads. scaly and flaky skin.
basically the excretions cause blockage of the hair follicles on the tail. leading to growth of bacteria and pyoderma.
IF this is what your dog has, you can start by gently exfoliating the tail with a bristle brush. washing with antibacterial soap (real medicated stuff, not like soft soap). let it dry then apply coco nut oil. maybe 2 times per week.
my boy recovered in about 5 weeks. after that i made sure to brush his tail and it never came back. he is 9 years old now. he has 2 small bald spots. but barely noticeable.
~ jo and Gotti Boi (aka Thunder Thighs, aka Jughead, aka The Doo Doo Monster, aka Sexual Chocolate, aka Mister Smiley, aka Sofa King)