Production programming: is there a practical size limit to serialization length?
The only off the shelf thing I can think of supporting it could be Segger's Flasher Secure.

Usually when I have to do anything more complex than a simple serial number I make a manufacturing mode in firmware, so flashing is one step, then the device is booted in a test bench, starts up and for example downloads its unique TLS certificates from a manufacturing server over Ethernet.