What I have read is that babies are more likely to poop in the womb passes 40 weeks. However that statement alone attached to it scared me not to take it. This is such a big subject for moms I would just say to do your own research and listen to your healthcare provider
Castor oil is definitely not a good idea it does cause fetal destress.
Safest and naturals ways are walking, sex, squats, warm bath, glass of red wine... there's so many more natural ways hun. But I would really stay away from the castor oil.