Firstly, the main doubt about safety of cookie dough or cookie ice cream during pregnancy stems from the use of raw eggs in its preparation and potential of contamination from harmful bacteria such as salmonella or E. coli.
Now, it is important to note that there is a difference between safety of cookie dough flavoured ice cream and cookie dough itself. While store bought cookie dough flavoured ice creams are safe as they are made from pasteurized ingredients, the same cannot be said for all cookie doughs as well.
When it comes to cookie dough (frozen or not), it best to go for those labeled “edible cookie dough” as they are made with ingredients safe for consuming raw.
Some eggs sold in the US and many other countries are already pasteurized making them safe, however, there is a risk of contamination post breaking them and mixing them in the batter if they are kept at room temperature for long. This is the reason why homemade cookie dough ice cream or homemade raw cookie dough should be avoided during pregnancy.
Finally, once you bake the raw cookie dough into blissful cookies, the high temperatures during baking make them safe and bacteria free. Just make sure you don’t overdo it as they are high in unhealthy fats and sugar – both examples of bad calories during pregnancy.