Your body will not allow you to do anything that will harm the baby. When it is time to stop, it will tell you.
The more healthy and fit the mother is, the healthier the baby will be - and the easier the birth will be.
I don't mean the 5% BF kind of fitness - I mean strong, conditioned, with a normal 15 - 20 % BF.
I saw a female Paramedic 8 months pregnant crawl into a muddy ditch, under a car, help extricate the victim, perform an endotracheal intubation and start an IV access right there - lying on her big ole' belly. I've actually worked with two of them until very late in the pregnancy. Then one day, the hips loosened up, the body said, "no more" - and they stopped working for a couple of weeks until they gave birth.
Now the time after having the baby is different - they shouldn't do anything too strenuous for 6-8 weeks. And not expect to be
fully recovered for up to two years.
After my last one was born, my wife asked the doc, "how long before I can have sex again". His reply was, "that depends on if you are in a private room, or semi-private".