Oooh! Stubborn little girl, ain't she!
Two things: If you have ruled out her resistance to go #2 properly as "fear based"? AND you have ruled out this being a medical issue (constipation, bowel obstruction, muscle spasms, etc...)
Then chalk it up to lazy and/or stubborn and get ready to OUT-STUBBORN her. But make sure you rule out those first two things!!! I had a friend whose child had encopresis and in the toddler years, child was "accomodated" (pull ups and mommy clean up, no questions asked) and by the time child was SIX it was words of frustration, "etc..." aimed at the poor kid. Traumatizing to that kid when school started.
Just rule out all legitimate "reasons".
If this is just a developmental delay on her part or simple stubbornness? Get a little step stool for the laundry sink and the next time she soils her pants (just hear me out, don't scowl too much) put your hands in your pockets, take the attitude of, "Hm, something doesn't smell so good." Escort her to the laundry room and have an easily understandable chat about, "How to do laundry."
Use Dreft or bar soap if you're worried about detergent being too strong. But if she's old enough and reasonable enough to wash her own hands, this is just a less (far less) pleasant form of maintaining some hygiene she has control over (in other words: prevention). If pooping her pants means having to clean the poop, touch the poop.... voila, you have just created one of many deterrents!
My third one did this just a handful of times and, no rubber gloves, I stood by her step stool at the laundry sink and was very positive and encouraging as she tackled a pair of those thick, waffle-fabric cotton Gerber underwear, a basin of warm water and a bar of Ivory soap (by no means did she come close to achieving "clean" by your standards or mine - believe me, when she was "done", I was scrubbing the hell out of them, bleaching them and rinsing them in Downey - little did she know this, however).
Soon after doing that 2 or 3 times, it was VERY easy for me to help her get dressed in the morning and nonchalantly say, "Now, remember about going to the bathroom, okay? Pay attention to if you feel like it's comin'! It's okay, though. If you have an accident, you can wash your underwear downstairs again, okay? I'll run the water for you." OMG - the look on her face - 2 years old - was like, "Oh HELL no!"
Find your child's "gross out" point. Pooping in her underwear is something she seems to not mind tolerating. Like I said, my youngest was no different, but she and I discovered together that she did, indeed, have an "ick" threshold after all (and so did I!).
good luck!!!!