There are a number of automatic backup apps which can run on a schedule. Many applications themselves have options to back up to cloud services. For those paranoid, several android phones have removable uSD cards which can be set to be the default location for application storage. If you're travelling and don't have the necessary network for backups, you can remove the uSD and store it somewhere unlikely to be found or searched - or just drop it in the mail to yourself on the way to the airport.
When interdictions at the airport became news, my first thought was to having a kill PIN. That would be better than a wipe and reset, as the whole process of re-downloading my apps from a fresh install, having to re-set some of my personal ringtones, custom keyboard, and logging back into apps can take close to an hour (Even if most of it is unattended).
What you're looking for is a dd-like mirror of the device which, afaik, does not exist for either platform. It's unlikely for iOS and most Android simply because you're talking about a backup which, for the barest devices, is going to be north of 12GB. Even on good WiFi to a local server that's going to be a long process, likely taking over an hour - easily three or more if you want to do a verification of the transfer (which you'd better do if you're about to wipe your phone). Phones with removable storage are an option, but even then you're talking multiple hours for backup and verification based on even the fastest cards.