My colleague wrote a very simple script to achieve some of this (and slow down too ...).
Basically the idea is to try to comment each one includein turn, and then try to compile the object, it does not deal with the inclusion in the headers, but already deletes a significant number of unused files :)
EDIT
for s in sourceFiles:
while t := commentNextInclude(s):
if compilationOk(): s := t
, #include , , , , .
script.