Hi beepmode,
This exists already, as part of Discourse, which this forum runs on. This is how you get to the delete account button:
- Click on your profile picture
- Look down in the dropdown menu for the profile button. Click that.
- Now click Preferences → Account
You should see a Delete My Account button at the bottom. This will do the trick : )