How to remove internal geometry programmatically in all meshes in .OBJ file?
This would not be perfect but should probably work well enough for your use case - you could render the objects from lots of different angles with a different solid color for each mesh component (without lighting) then remove any meshes that didn't appear in the final image by counting the pixel colours.
If the objects aren't split up into separate meshes then do this by repeatedly merging groups of triangles which share a vertex into the same group, starting with one group per triangle or polygon.