I have not read all the posts (apologies).
These are two of the best colleges in the world, obviously.
I generally think that Stanford is stronger in some STEM fields – especially Engineering and CS – while Yale is stronger in some Humanities fields. Overall, I think they are pretty even, but an academic edge may be based on major. A counter to that is that majors with relatively few students (like a Hum major at Stanford or some STEM majors at Yale) might actually serve students well, as there is less competition for individual time with profs.
Obviously a major difference is environment: Stanford is the California Ivy, while Yale is in the northeast – weather, culture/vibe, some activities, and the look of things are all different. Stanford has D1 sports and a sporty culture, while Yale is old school Ivy. Dorm systems are different. Etc.
If cost is close, I’d choose based on fit. (pretty standard advice from me…)