A lot going on in this post.
I wouldn't give consequences for bad grades I'd problem solve together with your child for bad grades. If your kid doesn't care about grades, I'd try to figure out why and have clear conversations about how that will impact his future and then that's his future. Don't save him from it. And then you have boundaries and the kid does what he's going to do. Examples of how this played out for my teen. We all can agree access to the phone on school days is a huge distraction and causing an issue, what can we do? Son agrees to some limits. Son admits he doesn't have great study skills or has been lazy in math and just copies answers to hard questions from a friend's homework and doesn't really understand the material. We give him some tools and strategies to help with this. At the end of the day though, we can set him up for success and their either going to do it or not. This is all based on having a semi-cooperative child, which means the kid has to have some positive thread of a relationship with you and trust you in some capacity. If you don't have that, you need to rebuild.
Anxiety and depression can't just be wished away. I hope your daughter has a therapist or some kind of treatment plan.
Sounds like you have contempt for your husband. Not even going to tackle that go to relationship forum, I think.