Can a sketch write to EEPROM while it is running.?

I have overwritten EEPROM data while trying that code. Is there a problem or risk for memory if I do so?

There is no way to erase all I have written in EEPROM to start from scratch?

Sorry CrossRoads but I don´t know how to do the test for 255 (0xFF). Can you tell me to do it please?

If I am not wrong you should never try to writte in EEPROM from loop as it would damage the memory. So it looks like a dead end for my project. Sure enough you know something that I don´t so it can be done. ¡Help please to understand this!

Sorry for so many things at once.