>Is there any difference between US citizens and visitors?
Yes. US citizens have an absolute right of return to the US (at a land border anyway, they can be stopped from boarding a flight to the US while physically in another country). If there's an active warrant for arrest or they commit a crime right there or the like they can be arrested, but the process at that point plays out the same as an arrest anywhere in the country with the same standards. Property can be screened and denied, or potentially seized, but the person can than challenge that and it must be returned unless there is reason. This significantly changes the math as far as practical inconvenience to refusal to cooperate, though I don't want to downplay how much it could suck for most people to have expensive stuff taken for even a short period of time. But they can't keep someone from getting home and, in turn, back to financial, legal, political, and social support networks which can back them from there.
Visitors on the other hand have no right to entry at all and can be denied for any legal reason (which in practice amounts to near anything). They can be banned from future entry as well for a period of time or indefinitely. So they face different (and greater) pressure.
>In my home country I can just deny getting my devices searched. They might be allowed to seize and seal them, awaiting a court order for searching the device. Which I could appeal.
This sounds roughly the same as America then, depending on specifics. Here LEAs may not unfortunately need a court order to search the devices of an American "as best they can", but they can't compel cooperation either (and in fact generally cannot get a court order for that at all outside of a narrow exception due to the 5th Amendment). So if a device isn't encrypted, or if it is but they're able to break into it, or if (as in this case) the person in question simply goes ahead and unlocks it for them then that's at least for now allowed (hopefully SCOTUS overrules the 2C), but they can't legally force password entry.
>Basically the same process as anywhere else in the country, international borders are not some special place that gives the police superpowers.
You don't mention your country (and that's fine!) but I don't think there is a single nation anywhere that doesn't have "police superpowers" at international borders. It's sorta a core part and parcel with the basic idea of a "nation" at all, that it can if it wishes regulate its people/goods exchange with the rest of the world. When you travel within a typical free-ish country you can just stop at a store in town and buy stuff and then take it home and the police can't investigate it and demand receipts and that you pay additional taxes or just outright seize it or make you take it back. Right? That's just, normal, within a single polity everything is already under the same rules.
But a border between independent polities by definition means that there could be goods legal in one but illegal in the other, or that are subject to different standards, or different safety considerations, or where there is disagreement on whether/how externalities are accounted for, or just simply taxed differently for pure revenue purposes. In turn, what country doesn't give themselves the right to regulate import of physical stuff, even if internally there is total freedom of movement and goods? Genuinely curious?
The argument here though is that this isn't about regulation of imports, but a criminal investigation. And I agree with legal scholars like Orin Kerr that the Second Circuit got this one wrong. This was not an import power thing, trying to stop contraband or levy legal import taxes, this was a criminal case, and I think that should always be protected by the 4A.