When it was potty time, we bought my daughter, Julia, "A STAR POTTY" (I don't know what it was really called, but that's what we called it.) Julia adored it and tinkled in the potty every time she had to go because she always got a star at the bottom. The problem I decided (some years later) was that unfortunately the potty didn't make a star when Juila pooped in it. So instead, yes, when Julia had to poop, she went off to hide in the closet every time. Maybe she had learned that pooping was bad because she didn't get a STAR, when she pooped in her special potty. You can never tell what kids are thinking.
Anyway sometimes, potty training can be hard for everyone. I am not an advocate of the Potty Train Your Child in Two Days philosophy..Most kids do not respond well to pressure. I worked with a very stern girl whose daughter still wore diapers at five. And I can tell you, there was nothing wrong with that little girl. She was smart, adorable and creative. It was just a power struggle. So, if you don't want a power struggle, make potty training fun.