Yeh my first pony done that, it was a mite cause she had very sensitive skin, you can buy some irretation spray for your horse. Also if you have a rug on your horse it should have a tail flap-yeh? Well that will help, cause he won't get it off as easy- oh yeh a tail bag might do to

. I am also thinking it might be due to his nutrion, how long ago was he wormed? Horses infested with worms usually rub their tail on objects.
How long has he done it for?
Cheers