Public restroom: no, but not for the obvious reason.
A public restroom stall door will only swing inward a little bit, stopping when it hits your knees. Every new person who comes into the bathroom and desires use of the toilet--possibly with urgency--has to investigate your stall long enough to make sure you're in there, whereas a closed door tells them to go right to the next stall, if there is one.
At home, pooping with the door open is fact mandatory, but I'd refer you to my cat for further explanation of this rule because she's the one who enforces it.