They can. Mine never have.
I had a hen break and eat one of her eggs on day 2. I don't think there is any way for her to have known an egg was bad that soon during incubation. I don't think she realized she had food in her enclosure and she was just hungry. I normally keep the door open to the maternity ward for setting hens but that particular hen was a bantam and a bit low in the pecking order and I wanted to give her more time to getting really broody so I closed the door. Once her door was opened, she didn't damage any more eggs.
This may or may not be similar to what happened with your hen. I suggest you do a managed broody break with her every day by carefully lifting her from her nest and putting her in the flock to tend to herself. Stick around and watch while she has her break and be there to monitor her getting back to her nest and settled before leaving. I like managing breaks with hens that have full access to the flock and the flock to her for the opportunity to inspect the nest to ensure no errant eggs have been laid with the hatching eggs. And so I know she has at least relieved herself, gotten some food, stretched her legs and wings, preened a bit and maybe a short bath. I keep fresh water with a setting hen at all times.
The water bottle will be moved over to this hen's nest so she can reach it while setting prior to hatch.
View attachment 4111752