Wow. Awful. .... I did hear of a an EV (Ford Focus EV) that went into the dealership to replace the differential (inside a similar gearbox to the Leaf's) and the technician forgot to put any fluid in. Failure occurred pretty quickly, after a few miles.
I'd guess, like you, that the factory assembly line worker didn't complete the fluid fill task. They squirt some in from a tank, and if that tank actually runs out, they have to stop the line, which they don't want to do. Could be that, of course guessing;;; looks like it.
It did appear like the seals were in very good shape. Clean. If it was leaking before & simply cleaned well, some would have still gotten out when you owned the car, even with the small amount in there, as it was splashing around.
Metal stuff on the magnets looked about normal anyway. Amazing how little it takes in there to grease everything up with only a little splashing & the big gear scooping some up as it's gear teeth get wet down low.
For the future, there is nothing special you can do. Check for leaks once a year. Fill it with any Dexron VI or Mercon LV or Redline or Amsoil ATF fluid or Matic S fluid of course. You did have a good idea to change it again soon to make sure the most metal particles in there get out.