hi D.,
you are not alone my daughter had the same problem she peed but wouldnt poop she was scared to be on the toilet for a long time cause she didnt want to fall in so she too would poop in her underware so what i would do is keep her undies on her and tell her that she cant poop in her underware and ask her how it feels cause pooping in undies feels a lot worse then in a diaper so after about 5 min of talking to her i would clean her up and then put undies again and tell her if she poops in them again then she would have to be treated like a baby again with diapers and a bottle and a pacifier and a crib and she would not be able to start big kid school and when she asked why i would tell her well i talked to your teacher and if you are not going in the toilet then you must not be a big girl and she doesnt want babies in her big kids class
it only took me about 3 or 4 times and she was all good another thing is when you put him on the potty i found if i held on to her legs the first couple times she felt safer about going so you could try these things
i dont think its worth going to the doctor about because i think everybodys child has gone through this so
i hope you have some luck and try these suggestions let us know what happened
L.