A thing I did with Key Mapper from F-Droid lets me undo by pressing Volume Down + Volume Up, and Redo by pressing Volume Up + Volume Down (the order matters). If anyone's interested I can share how to set it up.
Note that it'd work better and more seamlessly if you use Shizuku, but I don't so there's some caveats. I'll happily go into more detail if anyone wants, just ask.