MDS was working fine, but now startosinstall will not run without an error:
Error: erase installs are supported only on APFS disks
I have verified that I am booted to recovery partition that is older than the version of macOS I am trying to install. I have done internet recovery, and boot 10.13.6, also 10.14.6, to try to run the 10.14.6 installer. The only difference from before, when it was working, to now giving an error, is that 10.15 Catalina had been installed on these Macs for testing. But again, I have completely partitioned the drive, which should have removed all remnants, including a newer recovery partition.
It seems that startosinstall is unaware of the target drive (Macintosh HD = APFS) and thinks we want to wipe and install the recovery partition (HFS+ Disk Image). Specifying --volume /Volumes/Macintosh\ HD is not allowed with the --erase flag, but does install macOS if you erase first with Disk Utility, then manually call startosinstall --volume /Volumes/Macintosh\ HD (without the erase flag).
tl;dr Does something get changed if the Mac ever get Catalina installed, where startosinstall can’t figure out the target drive? Booting into full OS allows startosinstall to run, but not from recovery.