Intent is irrelevant as regards the Espionage Act.
Exactly.
The reason “intent” fails as a defense even in the minor example I gave is that all federal military and civilian employees have it drilled into their heads not to do this stuff from the first day they were hired.
Insanity is their only possible claim for “no intent”.