Both Fenway and my son graduated with STEM degrees; his went to an Ivy and mine to a D3. We found out late in the recruiting process that STEM and D1 are NOT compatible. Exceptions were Ivy's, some Patriot, Stanford, Vtech, Cal Poly, there may be a handful of others - but not many. Pitchers can get by much easier than position players.
If you are in the recruiting process you need to ask lots of SPECIFIC questions on how they handle afternoon lab time, specifically how certain players schedules differ from the mainstream players, how they pair up high academic kids in travel, etc. If they don't give you specific examples then beware. Look at rosters for those majors.
Your son better be able to function on limited sleep and be extremely disciplined. My son routinely was going to bed at 2:00AM, and up for classes at 7 and they let him do his lifting and "get his baseball work in" on his on schedule. Friday nights when his many of the players were out partying, his was in the library working, same with travel, and they paired up HA kids. Most D1's have early morning mandatory lifting at 6:00AM which will not work for a STEM major.
It is possible but not at highly competitive programs. You need to keep reminding yourself that coaches are paid to win, not graduate scientists and engineers.