What I was thinking was to write a script that acts directly on the database rather than try to run it through prunethreads.php. The problem is I need to know exactly what data and tables need to be purged. I can probably figure that out from the prunethreads.php file, but I was seeking the expert advice of the guys who wrote the code.
Let me poke around some, and I'll come back with some ideas and let you point out the flaws in my thinking.