|enabledelayedexpansion is only needed when you need it (Lol!)|
You can get by without it, but you need to know when, and when not.
M2's script happened not to need it, since the >>newfile echo statement was not inside (), so you're right. About 95% of the time, you will need it, but I like to "run lean" and only use when needed.
As for setlocal, only thing I can say, is if your script is completely uncooperative, check global ("environment") vars to see if any of your script var.s are showing up there. if they are, they can interfere with your intentions.