If you are of interest to the US government or any ally, assume your phone comes back from inspection with a compromised bootloader that will continuously re-infect your phone after you wipe/reinstall.
Wipe it, let them inspect it, sell it, and buy a new one.
Wipe it, let them inspect it, sell it, and buy a new one.