I don’t believe that the military has access to passport or visa records.
I’d think if they work with processing Americans thru an airport, then they do. I have worked with the technology. It’s not like you can look people up. There is technology for verification of both military and civilians. No doubt Our embassy has used that terminal and they are verified there when going thru. As well as military verification as it’s a terminal for military.