Doctor though is hard to learn, is highly skilled, the peak of their professional space, and so on.
I fell you've picked two alternatives that are poles apart. Surely there are choices between those 2? Have you considered moving up the programming food chain? Or perhaps a medical role that's not a doctor?
I'll be honest, once you said you won't respond to protect "well being" I don't think you'd like being a Dr. Sounds like you're looking for a low-stress environment (and medicine is not that). How are you going to cope with patients dying?
I think it would be helpful for you to see a psychologist to really understand your current feelings and motivations before you make large life choices. Jumping randomly out of the frying pan doesn't always end well.