Is it possible both (1) after LEDE has been installed and (2) during the build process to copy or create a config file in the /rom directory? My use case is that each device has a unique ID saved in a file that needs to persist over factory resets with jffs2.
That works for a single router build rather easily.
But if you have several routers, you might want to go with anomeome's suggestions of utilising uci-defaults and reading the ID somehow from hardware.
I used a few years ago a script to read MAC address of the router and place that into the wifi config. Something similar might work for you, if you can utilise some unique ID already on the router's permanent flash (like MAC, serial, whatever)
See example at the end of https://forum.openwrt.org/viewtopic.php?pid=185418#p185418