I've a spammer that managed to create 152,000 threads. Trying to run the Spam Cleaner results in an out-of-memory error from mysql. We found this issue because the db crashed due to a 10gb temp table that I assume Spam Cleaner was creating trying to process this massive amount.
Other than using standard mod tools to delete 20 at a time, what other safe options are there to clean this out?
The spam cleaner isn't really designed to process that amount of data.
Generally it would be expected that a spammer would be picked up before anywhere near that number of posts had been made.
Your only course of action is likely what you are doing - to manually delete a significant number of threads/posts before running the spam cleaner again.
You can however do more than 20 at a time - you can use the Batch Update Threads function in the ACP to mass delete threads.