This post will hopefully also serve as a periodically updated listing with links to older Mac OS versions for download for offline installation from image/ISO or reinstallation whether to install anew or as a way to downgrade.
It used to be that with the Mac App Store, if you downloaded the current (or new beta?) version of Mac OS, even if you delete the downloaded installer and chose not to upgrade, in the future if you ever needed it, it would be searcheable in the App Store and show up in your purchase/downloads section for re-download. You could then use various tools/scripts to generate an ISO image of the installer, etc. to deploy on DVD or a USB drive for install from boot/reboot. So the trick is to do this process for every new Mac OS release so you have it in your purchase/download history for access in future. But it seems this feature was removed in recent newer version of the App Store app. In any case, still might be useful to continue this process should this type of feature come back in the future. For your reference, this feature from what I know at least, last worked (i.e. is available) on App Store v2.4 (658.1) on Mac OS X 10.13.6 (High Sierra), and was not available on App Store v3.0 (1003.3) on Mac OS X 10.14.6 (Mojave).
As such, without that feature, it seems Apple did at least offer up some online repositories/links for getting some older versions of Mac OS X, and I list them below. If you know of additional ones that I don’t please share. I’ll update as I find more in future.
https://itunes.apple.com/us/app/macos-mojave/id1398502828?ls=1&mt=12
https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
Mac OS X 10.12 (Sierra)
http://updates-http.cdn-apple.com/2019/cert/061-39476-20191023-48f365f4-0015-4c41-9f44-39d3d2aca067/InstallOS.dmg
Mac OS X 10.11 (El Capitan)
http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg
Update 04/20/2020:
Came across this recently, that while not a solution for all older OS X versions, might help for some: osxdaily.com/2020/04/13/how-download-full-macos-installer-terminal. Supposedly you need to be on Catalina however in order to use it.