This feature already exists. Try writing an answer. Wait for about 30-45 seconds. Draft Saved will appear and a Discard button too.
(hover cursor to reveal)
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 ...