You can modify the "M2" command in grbl code to write a position to eeprom. And change the main() function to read that values.
Yes, that's the idea. You cannot write to the eeprom every second, it breaks realtime operation. so write to it at the end of program.
It's fairly common to invent your own G-codes. The piece of firmware that processes different G-code instructions is probably just a giant switch statement (mine is) and that means it's easy to add to. I had a bunch of fake codes I invented for getting debugging information. So you can just find the highest numbered M code and make sure your new one is (much) larger. Try M777 perhaps.That code can store pos to EEPROM. M778 can read the pos from EEPROM and go there.Or you could just leave the com port open of course
I would prefer rather to keep comport opened all the time.
Have you considered using a USB-TTL cable as I suggested in Reply #8? Then it would not be necessary to keep the com port open.