I don't think it's behavioral, although lots of time it's a control issue. If she sits on the potty and goes and is proud and happy, that doesn't sound very control-oriented at all.
It sounds to me like she is missing the cues that her body is putting out. You know...that sense of "oooh, the poop is RIGHT THERE" that we have LOL. That is a sensory issue and can be addressed although I am not sure how. I have a nephew who went through this although it started at age 1. My sister thought he was constipated. He wasn't, really, he was holding it in. (You could actually see the kid struggling to keep those buttcheeks tight. He'd stand super-straight, legs locked.) Well at 2.5 he ended up in the hospital (with seizures) and they found a "mass" in his belly. Turns out that was a year's worth of poo backed up in his body. (Yeah, seriously...ew!)
So I would talk to your pediatrician and also try to talk to her about the feeling she might be having. Know that if she is having a sensory issue, she really might NOT be feeling what we feel. She may have to be taught other cues.
Good luck.