Not sure how to handle it, really. Having complete support would be great, so other's don't get stuck like I do. But given the number of people who appear to have success with other STM32 parts and other versions of the bootloader, this might be one unique exception. Or there might even be low-RAM parts that have a lower limit. I suppose I'll open a technical support ticket with ST Micro, and ask if they have a complete list of special-case rules like this ...
Alright, I am going trout of my mind over this. I finally went to the extent of installing a serial port sniffer in Windows, and using the official STM32CubeProgrammer there to flash a longer binary, and, sure enough, their extended erase command transmits 0x63 as N, to erase only 100 pages at a time. Changing the stride from 511 to 99 in stm32_erase_memory and rebuilding makes flashing now work. Great that that isn't documented anywhere at all, thanks STMicro. jeeeeeeeeeeeeez
For the sake of thoroughness, I am creating the binaries via: dd if=/dev/urandom of=test.bin bs=2048 count=154 and dd if=/dev/urandom of=test.bin bs=2048 count=155 and flashing with: ./stm32flash -b 115200 -w test.bin /dev/cu.usbserial-A107L5XO
Flashing STM32F103ZG - can only erase 154 pages, but not 155+