1) While I am editing, can I close and open the PuTTY without danger while I have not saved the changes? (:wq)
2) Assuming the worst case, if a mistake is made, is it possible to reverse it? reinstall the firmware, set it factory default, and start over?
1- yes if you use the "x" bottom on top ,the setting won't be saved.
2- in theory the worst case scnerio is that you'll need to reset the miner. but still shit can happen.
since you are not going to do any coding , you shouldn't make any mistake, before you save just revise the code 2-3 times, compare it to the prev code you pasted here, make sure you have not deleted anything.