Thanks, Stan! I will have to think some more about how I want to handle the isolated tracks but this gives me a good start. Hadn't thought about the need for a resistor if a capacitor is added (was just thinking about the RC time scale of the capacitor and coil resistance). I have a postwar loco, and one from the '90s that still has a Pullmore AC motor, so I will use TVS diodes to be safe.
I ordered one of the buck converters and will check to see whether I can use a common common between the AC and DC sides, if not I will try the wall wart. I guess I should be able to figure out if the common commons are possible but easier just to test it.
I found an 8 channel relay module on Amazon made by HiLetgo that has screw terminals for the inputs, the PC board silkscreen is in English, and they even provide a partial schematic. Less than $10 and fast shipping.
It's going to be a little while before I get all of this together (starting with a simple tabletop oval for my son for Christmas so we will be able to run trains while working on the "big layout"), but will try to remember to update this thread when I do. Thanks again!