This is the reason why I am hesitant at the least to order after-market coolers for computers that are OEM. You never know whether they will properly fit until after you have tried it and most companies won't take the things back after they have been opened.
To the people who are asking "When would you need an after-market cooler for an OEM machine!".... when the OEM cooler has failed. As two of them have on my computers in the 20 years since I started with x86 machines.
I think the best solution would be to have a database of 3D models for cases & coolers. Maybe a site like PcPartPicker.com could do something like that, but they'd need cooperation from manufacturers or maybe some enthusiastic users to supply the models.
The models needn't be very detailed. At minimum, you'd need the dimensions of the main cavity and mounting position of the motherboard. I don't even know if motherboard standards dictate the CPU location. If not, then you'd need that too.
The benefit would be that you could see how much space there'd be for airflow, and maybe the site could even offer crude airflow simulations if the speeds of the fans are known.