It's solved.
You have to flash using the compressed version.
In this case, I copied my build over to /tmp on the device.
The mtd command would not work but sysupgrade did, even if it complained at the end.
The error message makes sense now, it's my shell that complained that connection was lost since the upgrade started.
Now my build is running on the device and I can use ImageBuilder.