I somehow have been using Emacs for 15 years without knowing such a thing existed. I've been using lisp-interactive-mode for this purpose.
I have been using Emacs ~50 years, and I have always hoped all of the history would be visible as lisp-expressions which you could view and modify in interactive mode. It is somewhere there because undo knows it. Typical example is that you fumble something splendid/stupid with fat fingers and then cant figure out what you just did.
(global-undo-tree-mode)
(setq undo-tree-auto-save-history t)
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
I did not know that.