Unless you do it thousands and thousands of times in which case the NAND might wear out.Such things can’t be either good / bad for your device. Generally restoring and setting up as new is the last resort if one is facing software related glitches.