Macports: How can I install ports using only versions from a date in the past?
Thank you to Lothar Haeger on the Macports mailing list for giving me the key hint I needed. What I had to do was:

Checkout a local copy of the Macports Port Tree from Github. cd ~; git clone https://github.com/macports/macports-ports

Reset my local port tree to an earlier point in time. cd macports-ports; git reset --hard commit-hash-from-2018

Generate a port index for my local port tree: portindex

Tell Macports to use my local port tree in place of the official online one. To do this, I opened macports's sources.conf (generally in /opt/local/etc/macports/) in a text editor, commented out the default URL at the bottom of the file, and added after it: file:///Users/my-user-name/macports-ports [default]