Very nice implementation of a BCD creator. And in a language I can read, heh.
The only thing that's missing would be driver reflection. I always wanted to have a magic command to just reflect a driver from WinPE into an already-installed Windows, but that seemed to be handled directly by Windows Setup back when I looked at it.
I think you can do it with DISM nowadays though. So just make a trip through a WinPE on the way to starting for the first time and everything would probably work fine.
I would bet that FOG[1] probably handles all of this reliably already. Anyone wishing for a real devops-style workflow for Windows installation could also look at Glazier[2].
1: https://fogproject.org/
2: https://github.com/google/glazier