In contrast, bulk shipments of imported devices are not usually tampered with in the same way[2]. Some countries do have similar restrictions on data import, but they can't mess with or spy on that data because you actually have end-to-end encryption in that case.
[0] I have heard reports of immigration officers demanding device passwords in such a case, but it's rare. If you're really paranoid, enough to want to do this when crossing US borders, I should point out that you should never live within 100 miles of them. Anything 100 miles or closer to a US border gives the US government power to demand your papers; furthermore, the people in border control treat this as a blank check to search for anything they want.
https://www.aclu.org/other/constitution-100-mile-border-zone
[1] I have yet to hear reports of iPhone users getting their phones searched.
[2] Yes I know "Tailored Access Operations" exist, but this usually involves shipping intercepts, not someone buying a device in a store.
Of course for this to be effective you should just purchase it in-person in a mall or something, and ideally don't provide any identifying information so they can't "customize" the device just for you, otherwise all bets are off and at that point it indeed becomes more secure to just bring your own and not let it out of your sight.
One preinstalled mitm cert, or sketch CA, is within the realm of feasibility.