I had a forum that was hit by spammers over the years. Most never got to post, but they filled up the memberlists and database massively. The prune users page in the ACP times out when you try to delete too many users at once, so I put together a script that automatically splits the total into small chunks that won't crash, and runs them until done.
Used successfully to clear out 700,000+ spambots on my board (Spammers are nuts...
It's not an extension, instead you run it on your local computer and it then logs into your forum as you and fills out the prune users page in the ACP exactly as you would.
The difference is that instead of you manually submitting the page a few thousands times and clicking just 100 users each time, you let the computer do that for you
The full repo and readme with instructions is here: https://github.com/michael-martin/phpbb-cleanup
Hope it's useful to someone!