I've used pencil, crayola crayon, ink for a fountain pen, and a Sharpie to mark eggs for incubation under a broody hen. They were all successful, I never saw a problem with any of those. Under a broody I do not date stamp them but mark lines around the egg so I can quickly identify them when checking under the broody for any eggs that do not belong. When using a pencil it was a wooden pencil with #1 or #0 lead, fairly soft. A #2 was too hard to leave a mark that was easy to read so I only tried that once.
When collecting eggs for the incubator I use a Sharpie to sequentially number the eggs as I collect them. The first day it might be 1 through 6, the second day 7 through 13, and so forth until I get how many I want. It's not a date stamp but I can tell which ones are older. The main reason I do it this way is so I can more easily follow specific eggs when they start to hatch. I put numbers top and bottom and on four sides. One of the side numbers is red, the rest black. That way I can tell if they have been turned with my automatic turner.
If you affect the bloom bacteria can get inside and the egg will turn rotten. I've never had that happen because of marking the eggs. I've experienced rotten eggs but there was another clear cause.