Lesson about NNIDs:
When you sign into a NNID on a console, the console checks Nintendo's servers to see if it's already associated with a console by it's serial number. If it's not, it submits the serial number to Nintendo and updates their records.
If it is already associated, you get the error that you cannot sign into another console. When you system transfer, it does two things. The target 3DS goes online and removes the serial on file for the NNID that's currently signed into it and then the serial for the original 3DS is updated on record to match that of the target 3DS.
You can also de-register your NNID yourself by using the built in system format. This requires internet access and goes online to de-register your serial from your NNID. This is also the only way to officially sign-out of a NNID.
In this exact scenario, here's what would happen:
o3DS starts system transfer to n3DS. n3DS goes online and removes the serial on file for your NNID. Then it updates the serial number on record for your wife's NNID and migrates the account over. Your wife's o3DS is left formatted and without a NNID associated with it. The n3DS has all your wife's files and her NNID. Once you install A9LH using Fieldrunners, you can format your 3DS safely which goes online and removes the serial from your wife's NNID. Now neither NNID is assigned to any console.