One way to avoid this nonsense is to mail your phone that you intend to use to your destination address. Especially if it’s a friend’s house or yours. It’s not illegal to ship a phone to yourself. Then that’s one less travel hassle. 

https://www.theguardian.com/australia-news/article/2024/jun/11/australian-border-force-abf-searching-phones-travellers-data