How can I undo when I move the cursor, Ctrl-Z doesn't work? I would prefer a keyboard shortcut, but any method will do, although I'd like to avoid scripts if possible.
You can try Cursor Control addon.
Note: To overwrite your actions you only need to go back in history.
As everywhere in blender you can Right Click on the arrow buttons of the cursor history to assign shortcuts for navigate back and forth: