Hi, D.,
Lots of suggestions, but none talk about what's going on for your daughter. Thumbsucking, hair pulling, nail biting, and all other nervous habits are all behaviours that alleviate anxiety, temporarily at least. Sucking is soothing and lots of babies do it before they're born.
As you have experienced, reminding a 2yo is like talking to a hurricane - it might make you feel like you're making sounds, but it's not going to have any noticable effect. The fact is, 2yos lack the brain structures to remember contextual information like this. Besides, the effectiveness of the soothing will win 100% of the time over anything someone said or did 10 minutes ago.
Since the behaviour is naturally-reinforcing (she enjoys it and it calms her), and doing nearly anything that draws attention to what she does when she's anxious (there is a lot for any 2yo to be anxious about - do you remember being a little kid and how big the world felt?) will add to her anxiety, you can use the techniques people have suggested to force her to find another way to alleviate her now-increased anxiety...
...Or you could help her deal with her anxiety in more effective ways.
For now, it's probably worth noting that a 2yo sucking her thumb falls into 'normal' behaviour, and abnormal thumb sucking is what happens after the age of 5. Before that, dental disorders are unlikely.
One last personal note: my husband adores super-spicy foods, and he links it to the great joy he got from sucking his thumb *anyhow* when people were putting a lot of effort into stopping him.