I feel like students complain a lot about how tough theoretical CS can be. When I was in school, a lot of former CS staple courses were moved into the graduate program and replaced with lighter, more practical courses in undergrad (i.e., compiler theory replace with a comparative programming languages course that touched on JVM bytecode). They event went so far as to split BSCS and BACS by reducing the math requirements even further for the BA degree.
In order to bridge that gap you'd need to tie programming to something women love as much as men loves working on machines that has moving parts.
Edit: And I've seen CS degree variants with heavy UX focus that tends to get 50/50 gender balance. It is really easy to shift gender balance in degrees this way, just shift it more to humans and you get more women, more to moving things and you get more men.
What are you talking about, people with chemistry PhD's are by definition doctors. Are you talking about physicians? You don't need to be a physician to develop medicine, a chemistry phd is more than enough to join a pharma company.
There are fully theoretical CS degrees out there, but that isn't the norm. Look at Stanford for example, one of the top rated schools in the world on this subject, and you can graduate with less theory courses than a typical engineer has to take.
So you'd expect CS to have a gender balance similar to most engineer degrees, which is what we see.
https://cs.stanford.edu/degrees/undergrad/Requirements.shtml
Edit: Just want to note that I am not correcting you on this, just noting the difference between the subjects.