Android/Google does this extremely well. I've recently had to do a few factory resets trying to fix a hardware issue on my phone.
Just turn on Google's backup service for apps and settings, let it finish syncing, and then factory reset. When you login to the fresh phone, it offers you that backup in the startup wizard. If you're on a good connection, restoring the backup is surprisingly fast.