Hey there, mommy!
I'm sure you do love mommyhood (your username). It's such a blessing! Stressful, but definately a blessing... ;) First of all, I would not punish her in any way. I would talk to her. I too am pregnant, almost 35wks now, and have a 3 yr old. My daughter is fully pt, (thank God!) but has been showing minor insecurities as well knowing the baby is on the way. She asked me the other day if I would still love her when the baby comes and if I will always love her no matter what. It was touching to me that she was able to communicate that insecurity with me. If she didn't know how to communicate that with me I would definately feel she would regress in one way or another, very possibly in the potty training dept. I have heard that this happens as well. She may not be thinking about her bowels (as another mom mentioned), being slightly stressed about her new upcoming role, the anticipation of new baby, if mommy is going to love her the same or if even at all, and what this means for her. I would try to give her assurance in every way you can, and try to spend as much quality time with her, reading her stories, coloring with her, having "mommy and me" time, maybe even having her help you with planning for the baby going with some of her "ideas". You may look into a fun video I recommend to all parents going through the pt stage, "Potty Power" (amazon.com). It's a great fun video that did wonders for my girl, as well as had many rave reviews. Kinda cheesy for us adults, but hey, we're pt trained already! :) Really, I think it's natural (yes, frustrating.... but when children sense our frustration, they act out even more, as I'm sure you know). She may not have the vocabulary we do and may not be able to express her feelings quite like us, so this seems to me to be a natural way her body is handling it rather than her making a conscience effort to upset you. It may take a few more accidents, but try to be patient and just show her extra love and positivity and before you know it, it will be a phase long gone.
Hang in there! I know it's tough, especially being as far along as you are (bending over to clean it up, the smell of nasty poo, trying to contain crazy hormones....etc etc- bc the list goes on!) but just remember, this will pass.
Good luck to you!
~ A.