The tried and true method to prevent egg eating is to cull the birds that are guilty. Once a few get the notion, the others in the flock will pick it up fast.
Another way was to darken the nest and use plenty of cushioning litter. Egg eating has been traditionally seen as a function of mechanics, not conscious thought. Chickens is bright, open nests tend to move around and be kinda clumsy. This leads to broken eggs and once that happens, you're done.
SO darken the nests with a curtain and make sure there are 4" of soft litter. Have a front board 4" tall and have the curtain reach down to within an inch of teh board. Use dark fabric and not some frilly, pattern. Black is fine.
You may also wish to develop a roll away nesting process. This is another way to defeat the habit. This means the egg once laid, rolls into a space or under a cover where the chicken cannot reach it. Not hard to make, they can be effective. Just google the term "roll away nest."
Lurid methods like hot sauce and golf balls, as much as we love such things, are limited in their scope. Birds dont taste "hot," as noted, and golf balls, well, maybe they work and maybe they dont.
The way to stop it is nip it before it gets started.