You are asking about making a custom cookie stamp--which could be fired unglazed porcelain if you have a local clay shop, or silicone if you don't.
To make a food safe silicone cookie stamp that will have a longer useful life than the royal icing, use food grade silicone mold medium. Make a shape out of a flat slab of canning paraffin wax bigger than a cookie, and carve the outline into it. In reverse, of course, as you would do with the royal icing.
Then mix up the silicone medium and cover the entire disk with it about 1/8" thick. Add something like a plastic disk with a handle to the back to keep it rigid. Let it harden according to the instructions. (Substitute clay for the silicone if you are going that route)
When you lift the firm silicone (clay), you will have the outline there on the flat face, ready to stamp into your raw cookies.