AFAIK there is a "bad" comment prevention feature that blocks certain comments, (it requires comments to have a minimum length, prevents posting certain phrases like "Thank you") but once a comment is posted it's required at least one flag or moderator intervention to delete a comment.
<hr>
Comments are not intended to be permanent. They could be flagged as "no longer required" among other options and if they got enough flags (sometimes only one flag is required) they will be deleted.

If there is something that should be permanent add it to a question or answer. By permanent I mean that even if "comments" are lately removed, they will still available on the revision history even if the post is deleted as >10k rep users still could access them.

Comments doesn't have a revision history, <s>so there is no a regular way to recover them</s>. ♦ moderators could undelete comments but you should ask directly on the corresponding meta (in this case https://meta.stackoverflow.com) the guidelines to make an undelete comment request.

Another alternative is to create a chat room. Under certain circumstances a suggestion to move comments to a chat room will appears but comments could be deleted before it appear, so if you don't want that a "good" comment be deleted, create the chat room in advance and add yourself the link to the chat room.

Related

- https://meta.stackexchange.com/q/187279/289691
- https://meta.stackexchange.com/q/196435/289691
- https://meta.stackexchange.com/q/269974/289691