Although it isn't clear in your question, your mention of traveling suggests that you're worrying about your own country's customs inspections. You will need to worry about those of your destination countries, too.
Sadly, the presence of encrypted data has been construed as evidence of wrongdoing. In the United States, on March 8, 2013 the 9th Federal Circuit Court of Appeals upheld the conviction of Howard Cotterman for possession of child pornography. The Court ruled that the presence of encrypted files on Cotterman's devices when he passed through customs, with his previous conviction crimes against children, provided probable cause for a forensic search of his devices.
From that and numerous other cases you must conclude that is is unsafe to take devices containing encrypted files through customs. In your own country, you write that officials can demand passcodes. Presumably, they can also demand the passcodes to unlock any encryption.
Merely encrypting data will not help you, even though modern encryption is strong enough to resist government intrusion on its own. Not only will encryption not help you, it may cast suspicion on you.
The only safe thing to do when traveling internationally is to take only absolutely clean devices through customs. If you can afford it, buy an inexpensive new phone to be used for travel. Otherwise, remove everything sensitive from your phone to local storage that will stay in your country when you travel.
Buy a new disk for your laptop and install a clean copy of MacOS on it. The old disk should stay in your country for re-installation when you return. Take few or no data files with you when you travel. Nothing should be encrypted.
If you need access to sensitive data while traveling, it should stay on a server accessible by VPN and never travel through customs. I suspect that server should not be iCloud; those familiar with the Apple ecosystem know about iCloud and might very well demand your iCloud access credentials if not already stored in your device. You probably need to clean your iCould files as well.
Be sure to clean your devices as necessary before the return trip, too.