With our friend's son, they worked on behavioral things and encouraged him to channel the compulsions to other hand behaviors, like flipping the edge of a folder, pulling bits of paper or tissue (like toilet tissue, I mean) and that sort of thing. They learned a lot from this site:
Trichotillomania Learning Center · About TTM & Treatment: Introduction