"Sepotong topi" is unheard of, and is actually not intuitive for Indonesian speakers, and I think that's why it's not used.
You see, sepotong was derived from the verb potong, meaning to cut. You can cut shirts or pants, i.e. in a tailor shop you'd see people cutting shirts or pants. But you'd think that a hat was made using methods other than cutting. And more, what people conceived of hats were different when the word was invented than it is today.
As a rule of thumb, if you can't remember the classifier, "sebuah" will most definitely do. I think we accept "sebuah" for almost all nouns from fruits (buah itself means fruit) to electrical appliances, the exceptions being living things (i.e. people and animals).