One: Deleting a post most likely marks it as "user deleted" or similar in the database. It's how you can still see the post in the ui and comment chains, just with a blurb saying it was deleted. The original content is likely still in that row, it's just got a boolean column for isDeleted.
Two: Editting is almost entirely the same. New row in the database with a column for parentCommentID which causes the website to show that over the original. The original might have a column for childComment or isEditted.
Three: Reddit TOS probably says they have a license to do whatever the fuck they want with your posts and comments. Unless you're in a place that has data governance laws like the GDPR, they have no obligation to delete your data.