Plugin exceeds memory limit

The code you use also uses WordPress functions that will first load posts (and other relevant data) in memory first and cache them using object cache. So, to delete 100.000 posts, your code will try to load each post in memory and that can take a lot of memory. I am not sure how high PHP memory is set in your case, but, you can either limit the deletion to 1000 or 5000 posts at once or increase PHP memory.