For a student who is particularly strong in math (he is taking Calculus BC and competing at AIME level in 8th grade), is it necessary to take AP courses in humanities in order to maximize his chances of getting into a top math/science/engineering program at Stanford or MIT, or is it enough for him to take math + science APs? Is it better to not take humanities APs and, instead, spend more time on math olympiad preparation and math projects / research, or do Stanford and MIT have a preferance for a “well-rounded” AP curriculum?
Congratulations on your child qualifying for AIME in 8th grade.
To your question: well, it is very hard to predict admission outcomes. You mention Stanford or MIT. Answer could be different for those.
MIT (and CalTech?) will probably be excited to see a USAMO qualifier (or even higher level of accomplishment in Maths). Getting a very prestigious research opportunity after 10th and/or 11th grade can also help.
Schools like Stanford and Ivies seemingly prefer a more well-rounded person. You don’t want to come across as someone who avoided anything outside Maths and Science. This does not mean having to take all history and English APs. Choosing some of them and doing well should help. Such classes might even help with reading and writing sections of SAT/ACT, which will almost certainly be very important.