I discovered something interesting: I thought this project was working on my Mini 510, but it turns out I hadn't tested it enough. It hangs during Xwindow load, and I haven't been able to figure out the reason why. I only testing the 510, I won't actually be using it, so it doesn't cause me a problem personally. Therefore you should test your own laptop to make sure this setup will work. As a workaround you can use a flash drive to boot your laptop.
I also had a problem which consumed a bit of time tracking down: an SD card set up with the script would work on a laptop for the first boot, but on the second it would hang. The card that was set up manually worked fine. What was different? After a couple of hours I tracked it down to this: when I wrote my setup script I decided not to put dwc2 in the modules load file. I assumed it wasn't necessary since I put the dwc2 overlay callout in the /boot/config.txt file. Turns out it WAS necessary. But why did it work at all as a mass storage gadget without dwc2 loaded? The only thing I can think of is that the normal USB driver already contains some gadget supporting code, but not quite enough. Maybe the foundation is slowly combining the two drivers. But working on first boot, where there isn't a second partition set up on the mass storage gadget, then failing when a second partition is present, is a bit of a puzzle. I'll have to remember to test all changes PRIOR to writing instruction/setup scripts in the future. It's the old "change one thing at a time" rule I should have learned a long time ago.
And here's another bit of weirdness: long or failed boots if the laptop SD card reader has something in it. Even if it's just an empty micro to full size SD adapter. This only happens during boot: the reader can be used after startup. I figured this out almost by accident: one of my laptops had a card adapter in it, the other didn't. It pays to strip things down to basics when testing.
It's something to watch out for on your own laptop.