Here’s a template letter of how to do so under GDPR. You must request your data or the deletion of you data using the correct legal framework (quoting the correct legislation) and these templates make this easy. Plus they cover more types of data than just your posts and comments.
https://www.datarequests.org/sample-letters/
You could consider making a data request first and after they respond, make a deletion request.
Let me add to that:
There are utilities (eg. andrewbanchich/shreddit) and even third-party websites that allow you to delete all your posts and comments (it’s of course way too impractical to do so via the reddit website/app).
IIUC it is not possible to delete all one’s posts/comments via the API alone (you can only delete the last thousand or so - IDK if repeating the process helps), so with most (all?) of these utilities one can provide a GDPR export of all comments/posts and they will then be able to delete everything.
You can request a GDPR export at www.reddit.com/settings/data-request (IDK if this works regardless of where you live), but it will take several days/weeks (I requested mine last week and I’m still waiting).
They got one calender month to provide it to you.
They are allowed to restore data that you delete. But they aren’t allowed to do so with the GDPR request.
It might take some time, but if you really want go GDPR.
Read somewhere on Reddit, that Reddit was restoring comments from deleted accounts.
Can’t confirm if that true or not
Once I’ve got my data under gdpr I’ll start with those mass comment edit services (shreddit, powerdeletesuite etc) and do several overwrites. Then I’ll request (demand) them ro nuke all my data. Obliterate it.