A combination of Erase-Coplanar-Edges and the Remove-Inner-Faces, then Erase-Coplanar-Edges again gets rid of most internal faces and edges BUT it can't remove inner faces that are subdivided and not coplanar or have a single-faced edge...
I thought about getting the all_connected face/edge and vertices and using the shape's topology - Euler Factor - v-e+f=2 etc to see if that helped - but so far not much use. If you remove the coplanar-edges first it does return 2 for simple solids + 1 for every internal cell making face... β