I don't know if what you are asking is a config or setting anywhere. Not one I've come across. However, there are some things that may help:
First, undo does not work for zoom or extent changes in ArcMap, that's true. However, on the "Tools" toolbar (the one with the identify, select element, find tools, etc...) there are the "Go Back to Previous Extent" and "Go To Next Extent" tools that are backward and forward blue arrows (they're grayed out as unavailable if there isn't a prior or next extent). These are intended for you to "undo" or "redo" zoom and extent (panning) changes in the data view or for a data-frame's extent in the layout view, so you could return to the exact extent you had previously.
Additionally, in the layout view, on the Layout toolbar, there are the "Go Back to Extent" and "Go Forward To Extent" tools with similar blue arrow icons only on a background of a page icon that do the same thing but for the page layout when in layout view.
Next, I don't know if this fits you situation or not, but if you have a specific extent you are zoomed and panned to that you don't want to loose, go up to the "Bookmarks" menu and use Create Bookmark and give it a name to add a bookmark for that extent (if you are in layout view, this will only work for the active data frame). Then, if you ever pan or zoom the map (accidentally or intentionally to look at something else), you just go up to the Bookmark menu again and select the bookmark name. More about creating, managing, and using bookmarks is at https://desktop.arcgis.com/en/arcmap/10.3/map/working-with-arcmap/using-spatial-bookmarks.htm.
And finally, again, this is not an automated way of doing what you are asking, but if part of the problem is the annoyance of having to go up to the toolbars to switch selected tools, then I would recommend you look at assigning hotkeys. You can assign keyboard shortcuts/hotkeys so by pressing a key combination you specify (ex: CTRL + 1) you would switch to a specific tool. In this way you could assign a specific shortcut to the Select Element tool and any other tools you frequently use, so if the tool get switched off of it, you can quickly press the key combo and it will change the tool back to the Select Element (or other tool) that you want. More info about hotkeys in ArcMap is at https://desktop.arcgis.com/en/arcmap/latest/get-started/customizing-the-ui/assigning-a-shortcut-key.htm
I know none of these are likely the answer you were really hoping for, but hopefully it helps anyway.