With my first I worked until I couldn’t take it anymore, which was 4 days after my due date. I went into labor that evening, after I’d sent my last transition emails. I’d been working from home for about 2 weeks.
With my second, I had an induction scheduled for a Wednesday, and I officially worked until the preceding Friday, though I worked from home a bit after that to finish up some loose ends.
I really liked being able to wrap things up or cleanly transition to coverage before starting my leave. I think if I waited for labor I would have been worried about that stuff.