I'm Jewish, so I'm useless to you on the gingerbread issue - LOL! Love the milk carton idea.
However, there are plenty of harmless deterrents to ants, so start there - pepper sprinkled in key locations or a 50/50 vinegar/water spray for counters and baseboards are two ways to start. And totally harmless for you, your 3 year old, and any pets. I use a cayenne pepper spray in the garage to keep out the mice and squirrels looking for a warm spot to spend the winter.
Also, small insects or their eggs can lurk in the ingredients for many baking projects. I had a big problem last year with pantry moths (which lay eggs in flour, pasta, even dog treats, etc. which the hatched larva then eat), and while I used some cheap traps to catch the adult moths, I also followed instructions to get rid of the eggs to prevent new hatchlings. I put all my flour and sugar and similar products in the freezer for a week, and then I stored them in canisters or zipper bags. Haven't had a problem since. So put your sugar and other powdered ingredients into the freezer, even if you rotate them through because you don't have room, and zipper-bag the rest while they "wait their turn" to be frozen. Everything that could be a "home site" comes in from the supermarket and goes right to the freezer. I replaced my traps but they are empty so I think if you do the same thing, you'll likely get rid of pests.
How nice that you are doing this tradition with your child!
ETA: Nervy Girl, yes, but probably shriveled and rendered inert. But pretty much everything you bring home from the store has insect parts in it. There are actual FDA standards for how much is allowable, same with rodent hairs and so on! Same goes for what you buy at the farm stand. So we can't avoid it - unappetizing as it is to think about. The point I was making for Ebird is that you can't avoid every insect, but you can reduce the "swarm" or infestation she experienced with her gingerbread house!