The best defence I have seen for this is to keep all your data on cloud storage and do a base install whenever you are crossing questionable borders. Rather than a cloud provider, host your own Nextcloud instance.
I have advised similar things. Backup, factory reset while going through the border and restore once done. The fact that they can legally seize without any justification and no transparency over what is taken is still an issue though.