As my own academic history interests have developed increasingly in the direction of history of science and medicine, I have been wondering about this. I am just about finished with my undergraduate degree in history, and have also completed the credit-equivalent of minors in both biology and chemistry (along with 3 courses in physics) so I have some grounding in the sciences. For history of science PhD programs, (PhD programs which I am fully aware would almost never be recommended by this sub- the job market sucks, is non-existent, I know, I know...) is a more extensive academic grounding in the sciences expected, or is this a decent start? My history department doesn't have any faculty specialized in the history of science, so I haven't been able to get any great advice from my them as of yet.
Current PhD student in Hist of Science/Tech. I am the only one in my department with and scientific background. I had a double major in biochemistry and was actually medical or laboratory science bound before I changed career paths. So I have a lot of science experience. The rest of the tech students were just straight up history majors and have (no offense) no clue how science works. I am the only one who works purely with science though. They work with more cultural and political themes of the field but are still cast under that umbrella. As far as faculty go, we have one who has a physics background but none of the others have much science going for them.
I think it varies program to program. They’re more interested in what you can contribute to your field more so than what your majors are and then finding someone you work well with and who is willing to take you in. The key is to remember you won’t be in a lab producing research so detailed knowledge of the field isn’t the most important as your historical background and ability to produce history.
Perhaps you could check the websites of staff in some university departments who are in this field. Most or at least some will list their education, so you’ll be able to see what they did. My hunch would be that aside from some understanding of the actual science, it may also be important to understand how the scientific method/ research process works in the field you’re looking to study.
In my experience, having a serious background in STEMM can be useful, but it is by no means necessary. Mostly I think it can help shape your research interests, but even that's not always the case. My background was in biomedical science before moving into history of science, and my research focus in history has continued in that direction. In contrast, my principal advisor did not have a formal science background, but did wonderful research on social and cultural history of medicine and genetics. One of my other advisors had a previous PhD in biochemistry, but his historical research mostly focused on Cold War nuclear and aerospace.
A technical background will mostly help you get a clearer picture of where your research interests lie (and where they don't), and it can be helpful for working with certain types of sources (including scientists themselves, if one of your historical research methods is oral history).
It also depends on what time period you choose to study. As you go further back in time, a technical background is often much less important than other specialized knowledge, such as language skills.
I hope this helps. Good luck!