It's a terribly sad moment when you realise you have to make the seismic shift from:
A: Being the best parent you can be by ... facilitating contact and a good relationship with the other parent'
And on to the very different B:
Being the best parent you can be by ... protecting your child from the harm that seeing the other parent would do.
It's a huge shift in gears, and involves the death of that tiny sliver of hope and optimism that your dc will have the family she deserves.
Changing perspectives like that can be too much for some people. Giving up on the dream, and also admitting you were wrong in some ways, 'proved' by you suddenly reserving direction. I think it's a good and sensible step forwards vs a guilty retreat but it's hard to see it like that sometimes I think maybe it's that 'sunk losses fallacy' thing (or whatever it's called!) as well.
I did the big parenting shift a couple of years ago now and I can still remember the moment I realised I needed to protect DS from his own father. Very similar to your situation in some ways... incapable of putting his child before his own desires, and putting DS in danger through unthinking neglect.
I still feel guilty about the damage being around his father did to DS. And that I let it happen for too long, I wish I'd changed tack at least 6 mths before I did. As it is poor DS is only just starting to show the effects of the damage that selfish bastard did. And I'm still trying to repair the damage. 3 yrs later. Children internalise the messages their parents give them and they get hard wired into brain development, identity, self esteem, social and emotional development etc etc etc. DS was being shown that he didn't matter as much as anything else in his fathers life. And that he must be different / less worthy than other children he saw whose daddy's cared about them. He's getting better, but it's a hard road and one that should never have had to be travelled.
You're being great and it seems that you're shifted those mental gears already. I hope I'm not sounding patronising but my overwhelming response to this thread is a big Well Done to you. You really are being the best mum your DD could have 