Always format, wipe will not remove encryption.
So you asking about backup? sync with xiaomi cloud, will make good backup of your setting and home screen, with apps it's not good, it will restore the apps but not app data and it very slow. So i make local backup with titanium. After clean flash...