Some people get overly concerned (IMO) with the flashing procedure. I take a minimalist approach and just flash the shipped ROM, let it go to the screen alignment step, and then flash my custom ROMs. I have never had the random hard resets happen with this method. I've read about some people who like to use the term flash dance flashing stock, hard resetting the stock rom, flashing custom, and hard resetting that, etc. I would try the simpler route first and see if it fixes your problems
.