I don't know how to do this without doing it from the database level... and that could have unintended consequences if you just delete the posts from the DB.
But, just to give you our procedure - We don't permit deletion of accounts, but we do allow people to request that their personal information be removed. In this case, to avoid the situation you are facing, we do the following steps when a user wants to leave the site:
1) Rename the account
2) Remove the email account
3) Change the password
4) Disable social interactions (privacy settings, etc.)
5) Delete all private conversations'
6) Remove Promotions, Additional Access Levels
7) DB Level: replace any occurrences of the user name where it's not automatically replaced.
This process leaves the account intact and all content linked for further action if needed. We do require the requester to specifically identify PII content that needs to be address. The onus is on the requesting member to identify and report offending content, we will not pursue this.
To date, five years since this policy was put in place, it's worked fine for our purpose and requesting members were happy with the results.
On a side note, we generally don't permit people to just blanket delete their post content unless there's a legal reason to do so.