I don't know that it's a bicycle commuter issue, but just a working issue. It's just compounded by your reliance on the train schedule. When I was regularly taking the bus, I had it worked out on a little chart showing me what time I needed to leave to catch a specific bus home. Problem being that by the afternoon the busses have usually gotten a little off schedule, and I'd often end up waiting 15 minutes or more for a bus that took 30 minutes or more to get me home. Or I could bike all the way in about 40 minutes. It eventually became clear that while the morning bus could save me a good amount of time, the afternoon commute was as often longer as it was shorter. Now I just bike home and never worry about the bus schedule. That may not be an option for you, but if it is, it might be worth considering. It's nice, especially when your end-of-day is variable, to not have those transit cut offs looming over you.
But as for appointments that get missed, I would guess that's a situation you need to discuss with your employer. It seems inconsiderate to spring OT on the employees without warning. If it's a condition of your job, there's only so much you can do, but perhaps there's an option of a preemptive strike, in which you tell the boss before the subject of OT. As in, "By the way, I have a doctor's appointment tomorrow after work, so if anything needs done by the end of the day, make sure you tell me early enough because I have to be out of here no later than five."
I don't know if that's an option in your situation, but it seems like a decent employer will realize that you need a life outside of work, especially if you only make an issue of it occasionally, and especially if the time you want off is technically beyond the confines of the work day to begin with.