Oohh ok so if I do the memory swap thingy and something goes wrong, a nandroid backup will fix it?
A nandroid backup will normally contain the following. A backup of your system partition, data partition, cache partition, boot partition, and depending on the recovery and/or the user, there may be other partitions included, but the ones I listed are the main focus.
The system partition is where you find all your system apps, frameworks, modules, etc, etc. Its basically every single file and subdirectory located in the /system folder if looking at it with a file manager like es file explorer. The data partition is the same thing, as well as the cache, and so forth. The boot.img is normally pulled by the custom recovery using the dd command and then simply renames it to something else like boot.emmc.win for example. They do that as a signature thing on their part but it is no different then renaming it to boot.img. The system.img from the system partition is pulled and then reformatted to usually a type of tar file depending upon the recovery being used to make the backup. For example, TWRP names it system.ext4.win (or something similar - going off the top of my head). Just rename it to system.img and it would basically be the same thing. It looks crazy, but it is simply a tar file and the following command will extract it:
Anyways, yes, a backup will recover your device, but some things need to be considered. When you make changes on your phone, you need to determine what and where is actually being modified. Does it fall in the system partition, boot partition, data partition, etc, etc. If it does, then you will know your backup will restore and fix it. BUT, if its something pertaining outside of these known partitions that would normally be found in a backup then you may be required to pull that specific partition manually for safe keeping (but that is normally done so by more advanced users).