Is it possible to acquire salmonella from consuming royal icing? Is it better to use a powder substitute? I am afraid to serve egg whites that have not been cooked in a recipe. What do you think?
If you can get a powdered substitute, or even pasteurized egg whites, and it will make you feel better, go for it. I understand that using meringue powder is actually a bit easier to work with, so if it's convenient to you, and if it provides some peace of mind, don't hesitate. It won't compromise your final product at all.
I think there are official guidelines saying that eggs must be pasteurized (I forget whether the temperature is 140 or 160F) to be considered "safe," but common wisdom and experience would disagree with that. There's such a high proportion of sugar in royal icing that it will kill anything that might be living in the whites. And salmonella is pretty uncommon, in the grand scheme of things, and when it is found, it's usually in the yolks. If your egg whites are fresh and have been stored properly, I really would not worry about it for royal icing at all.
I won't say that it is entirely impossible to get salmonella from royal icing, but I think the odds are negligible. So again, do what makes you feel better.
You can also consider a vegan substitute. I have used the recipe below (with plain unsweetened soy milk) and it was great, although I have never made royal icing with eggs before, so I couldn't tell you how they compare directly.
2-1/4 Cup Confectioners Sugar
2 Tablespoon Light Corn Syrup
1-2 Tablespoon Almond Milk add more as needed 1/2 tsp at a time
Vegan Food Coloring optional
In a bowl, combine the powdered sugar, corn syrup and almond milk with a fork until smooth. If it is too thick, add more almond milk 1/2 tsp at a time. If it is too thin, add more confectioners sugar 1 tsp at a time.
The icing should maintain its shape when drizzled but eventually 'heal' or settle back into itself. Test a cookie or two and wait a few minutes to see if it's too runny before proceeding.