It seems as though you need a two part solution:
To stop the thumb-sucking behaviour, but also to simultaneously substitute a more acceptable self-calming behavior.
My daughter used to kiss the backs of her own hands to comfort herself. When she got to pre-k she had a particularly insensitive teacher who forbade her to do so, allegedly for sanitary reasons (?!). So... She started biting/sucking (and bruising) her arms instead, even out of school.
Eventually I found a wonderful substitute/solution in the form of a chewable bracelet called "Chewlery". It looks like old fashioned, curly telephone cord, is safe for mouthing (even aggressive chewing) and comes in bright colors- one to match every outfit.
I found it in a catalog called "Abilitations" which specializes in aids for all kinds of disabilities (great resource for ADHD, Autism Spectrum, etc.). I'm not intimating your daughter has any issue other than the need to calm herself in a safe, acceptable manner; my daughter was in the same position.
Anyway, she wore these for the first few weeks of kindergarten and soon enough the behavior, then the bracelets just faded away. Occasionally, I'll see one of her dolls or stuffed animals wearing one; otherwise they stay tucked in a plastic bag in her sock drawer.
You can shop Abilitations online too- They have all kinds of really neat stuff. Your daughter might like to choose something with you that she thinks she might help her break her habit, but still bring her comfort.
My daughter and I chose several things together, which I think helped her feel empowered as opposed to having another rule imposed upon her by adults. The whole process became a confidence-building exercise, which is what was needed to begin with. When she was ready, the behavior disappeared. A lot like potty training now that I think of it!