Optimize the `DELETE` statement in `remove_exposure` function

The DELETE statement uses a WHERE ... IN clause that is very slow for large datasets in the IN clause. This can potentially be improved with a temporary table with an index.

\rfc @shinde @tara @laurens