With DS, the thing that finally worked was that I let go of it. I absolutely could not stand myself anymore, could not stand the whole issue and the fact that we had it, could not deal with the constant poopy pants and the battle of wills and the person I had become, who was, by the way, a screaming shrew.
If I had had me for a mother at that point, I would have undoubtedly crapped my pants, too.
When I made the conscious decision to let go, that it was not going to bother me anymore and I was not going to react to it, it went away.
With DD, it was the threat of not being able to go to preschool in diapers, along with the fact that we simply stopped buying pullups and bought underwear instead. In less than a week, she was fine.