>What starts off as an irritant can also turn into a habit
I think this too. Years ago, before vets had such super overnight facilities, I remember one vet telling me that she had taken a patient home with her.
The owner had been going backwards and forwards to the vet with a Toy Poodle who wouldn't stop nibbling at his own genitals. No cause could be found by the vet that told me this story.
She took the dog home for a weekend to watch him. While they were eating dinner she had taken a water spray to the table. When the dog started nibbling, she squirted him, and he was distracted, and didn't appear to know where the missile had come from! It only took a weekend, and that dog stopped his compulsive behaviour. He actually used to make himself bleed, and the original cause was never found. But when he went home, the nibbling cycle had stopped.
Curious!