Feeling like a failure

Am I a failure as a mother if my 3 year old has a cavity? I feel so awful. We brush her teeth but she insists on bringing a yogurt pouch to bed or she won't sleep. I know it's an awful habit but I needed my sleep so desperately (had two under two) so I gave in. I'm bringing her to the dentist soon and I am bracing myself because I am sure they're going to ream me out. I feel terrible. 😭