"Even many so-called democratic countries, such as Canada and the U.S., can search phones without warrant during customs."
But see Alasaad v. Nielsen (2019), in which a Federal District Court in Massachusetts held that phone searches at the border "violate the Fourth Amendment to the extent that the policies do not require reasonable suspicion that the devices contain contraband." Of course this decision is not final and will be appealed. But the judicial oversight does show "so-called democracy" at work.