That wouldn't work with all materials that could be used to cover the camera. The proximity sensors that you describe are designed specifically to measure the change in capacitance due to proximity to a human; they can't detect something like a blob of glue that causes no change in capacitance.
For some reason this really doesn't work for me. I have also enabled the extra feature of locking the touch screen when in dark places, too. I still regularly get my pocket navigating my browser and my ear starting songs on Spotify mid-call.