I've had to deal with image scans and my own approach lately has been to quantize to 16-color (grayscale via pngquant) and oxipng with zopfli set to max. Mostly so that the output can be easily used in a browser UI.
Will definitely have to look into your solution with JBIG2 next time. Though I may keep with png just for compatibility sake.
Yeah, I had Claude generate me the jbig2 to 1-bit png wasm module from the jbig2 source so that there'd be no dependencies on zlib or libpng. Then I aggressively removed functions from 97kb down to 17kb. So if it's missing functions you need you may need to reset the files to the .bak and recompile.
Will definitely have to look into your solution with JBIG2 next time. Though I may keep with png just for compatibility sake.