Can you get banned? Yes. Will you?
If you do a nand backup of a clean switch (clean meaning, there's nothing on it that would flag it for a ban, we don't know exactly what gets a ban so you'll get cryptic answers), and don't go online until after you restore that clean nand, what you do in-between the backup/restore should not matter at all. It's possible that there's already incriminating evidence on the switch that will lead to an inevitable ban, or that the backup/restore leaves a trace behind (very unlikely), or that you'll do something AFTER the restore which leads to a ban.
In short, do a nand backup, do whatever naughty stuff you're going to do (use protection!), then restore the nand before going online again. You will probably be ok, but no getting mad at me if your switch catches a ban. Abstinence is the only method that's 100% safe.