If it is all the same model, you could use the TWRP backup-restore feature to clone a performed installation ( /boot, /recovery, /system & /data = system + installed apps and settings )
DON’T CLONE THE /EFS PARTITION ! where IMEI is stored
Some variation on cloning would be best for automation, but as @piero said your flashing tools would need to be made one for every device.
iPhone get automation. They just make the same phone over and over and put a new label on it each year. For a Production Engineer that is true automation.