I'm a PhD in biomedical sciences (biochem/bioinformatics), so I don't know directly about the MD side, although I work with MDs frequently.
From what I have seen, physicians are generally not tech-savvy and are fairly behind-the-curve when it comes to automation. Even many of the things that are currently possible to automate, like EMRs and some aspects of diagnosis, aren't. Since any technology that replaces what a physician does has to be approved by the FDA, it moves very slowly. I think it is a long time before large numbers of physicians are put out of work by technology. Especially since the quantity of MDs is artificially limited.
That said, radiology is probably one of the first specialties that will be automated. Already, some image recognition algorithms have been shown to outperform trained radiologists at recognizing, e.g., cancer. So, if you're purely after job security, it might not be the best specialty to choose.
But with a tech-heavy background like an EE, you have plenty of options. MD/PhD + tech background is a perfect preparation for research, if you're into that. Or you can help develop systems to automate various aspects of medicine. Although it will put people out of work, in my opinion automation in medicine is a very good thing for society because algorithms don't make mistakes (other than the inherent limitations of the algorithm), don't get tired, and you don't have to pay them, so automation should lower soaring health care costs. You can always go into a biotech firm as well.
To answer 2), yes, physicians (at many places) have good flexibility with their hours. The only thing you might have to worry about is who owns IP, especially if you work for a university health care system.