This feature already exists. Try writing an answer. Wait for about 30-45 seconds. Draft Saved will appear and a Discard button too.
There was a secret hat just for discarding the draft in Winter Bash 2018 and Winter Bash 2019.
From waffles' answer on What are the details/implementation of the draft feature? - Meta Stack Exchange:
Drafts are stored in redis for 7 days, with each site having storage
for one draft question and one draft answer per user.
For anonymous we use cookie to track the user. For non anonymous we
use the user id.
We ship it to the server in the heartbeat (once a minute or so), the
heartbeat also notifies you when new answers were added in the banner
on the top.
We only store drafts for new answers and new questions, not for edits.
Also, for questions, only one draft is saved which can be retrieved after you click on Ask a question button. For answers, you should be lucky enough to find the question to find the answer's draft.
From Glorfindel's answer on How can I find my saved draft answers? - Meta Stack Overflow:
There is no page on the Stack Overflow site with a list of your drafts, and since the drafts are stored server-side, you cannot browse your local storage / cookies for question IDs.