I did a semester exchange at USMA and this was my personal observation.
The atmosphere of USMA's Corps of Cadets was generally more uptight and serious compared to USAFA's Cadet Wing. More specifically, USMA cadets were on average more professional and rigid compared to their USAFA counterparts that tend to be more relaxed. Also, USMA had a very rank heavy/mission first mindset (which I think was really just an extension of Army's culture) that oftentimes resulted in the institution 'ruling through fear'. USAFA is not as rank heavy as USMA and has a better life quality, probably resulting from AF's culture of taking care of its people. I think this can make most people think that USAFA cadets are less disciplined than USMA cadets, which I think is true to a considerable extent. Not because USAFA cadets have worse character than USMA cadets but due to their services' culture differences.
While I thought USMA's military/leadership development through its structured chain of command system was far more advanced than USAFA's development system, I thought USAFA handled academics much better. Not only were classes at USMA generally easier than their equivalent level classes at USAFA, the quality and the devotion of the academic faculty seemed better at USAFA. Furthermore, academics was taken a lot more seriously by USAFA cadets than USMA cadets which I also think is the part of the cultural differences between the two services. Bottom line, I thought USAFA handled academics much better while USMA had an upperhand in terms of military/leadership development.
If you want to major in STEM, I think USAFA will offer you a better environment for deep learning. Not only does USAFA in general prioritize academics more seriously than other pillars compared to USMA, there are more options of STEM degrees at USAFA. Furthermore, the percentage of STEM majors is higher at USAFA which could help you surround yourself with likeminded peers.
You also mentioned that you plan on separating from service after 5 years. While I can't intelligently advise you on which school will be better for your career post 5 years military since I haven't seen that side yet, but I honestly don't think it matters which one you choose in the grand scheme of things. Both are prestigious service academies and you would have had 5 years of officer experience when you apply for a job in the private sector. Most civilians don't really know what exactly you did in the military and quite frankly, a lot of them never even heard of the service academies. So I think it mostly depends on your competence/ability to market yourself. But if I were to be in your shoes and HAD to choose one academy over the other, I will go with USAFA. Maybe it's because I'm biased but based on the service culture (rank heavy Army v. more corporate minded AF/SF), I think you will fit into the private sector better if you went the AF/SF route. I'm no expert on this but I think corporate leadership style is closer to AF leadership than Army. Also, if you go USAFA route, you could become an acquisitions program manager or a contracting officer as an O-1. In the Army, you have to wait at least until you are an O-3 or above to transiton into those "functional areas". In other words, you will have better job experience that are more applicable to the civilian side product management as a transitioning AF officer. Not only that, as a program manager in the AF, you will be able to make a lot of civilian connections in the industries depending on your assignment. At least you will have an advantage over your Army counterparts that are also seeking to transiton.
Hope this helps, and please understand this is my personal opinion and others may disagree.