NASA more standing than the oldest US LEO?
That is a possibility, some areas of NASA's research is more important to national security than protecting the borders from dodgy porn or similar. The exact nature of certain valving arrangements on liquid fuel rockets might be of interest to North Korea for example. Or some of their more advanced jet propulsion research might be of interest to Russia. The thing is that customs officer had no real good reason to search the phone and plenty of reasons why he shouldn't. Even if he did have the legal right to do it, it might not be the sensible thing to do.