Thanks for everyone's help. I looked through the script this whole weekend and enjoyed every bit of my weekend being spent looking at code trying to figure it out, instead of relaxing
The solution made no sense but it worked.
I went though the script with a fine toothed comb. I copied files from a folder where I kept the original script (15 years ago) and replaced the ones on the domain, doing so one file at at a time, testing, and then continuing on.
The file that finally did it was the functions.php file. It doesn't make sense because I never changed that file during the https switch, or I thought anyway.
Perhaps I opened that file just to look through and hit "break" accidentally, and so with a break line the code wasn't working anymore.
I still don't know what actually happened.* The newer (original) file looks identical to the one I replaced it with.
In any case thanks for all your help.