Food coloring is used in food. I understand some people have some concerns with some of it, especially the red, but since it is used in food it is not that toxic, especially when not eaten.
I’ve never tried it, but it should wear off daily. You’d probably have to put it in every morning before they lay. I’ve seen a few photos (very few) on here of people that have done this and those markings are pretty light. Hopefully some of those people will see this and chime in.
When a hen lays an egg, the part that is around the egg protrudes from the vent a little to protect the egg from anything nasty that might be in the vent. That’s why the eggs are clean even though they poop out of the same vent. It’s not like you are putting the food coloring in the portion the egg I actually coming out of. It’s more that you are putting it in the general area and hoping a bit shows up.
I can understand some of your frustration since both hens lay the same size and color of egg. The only way I can think of that might work since you have trouble separating them is to build a trap nest. When a hen goes in the nest to lay an egg, she is trapped in there until you release her. But that means you need to be around to release her.
I really don’t have a good answer for you. Food coloring sounds the most promising but that may be a pain to do and I’m not sure how absolutely reliable it is. I don’t know that every egg will get marked.
Another possibility might be to use lipstick around the vent. That may be more likely to rub off on the egg though you’d probably have to apply it every morning too. I’m certainly not going to try that one. No way do I want to try to explain to my wife why I’m putting lipstick on a chicken’s vent.
Good luck!