Your ex is as responsible for this dog as you are.
Why can he not go to your daughters dads when she does?
I'd discuss with daughter new regime for when he is at yours...
you get up early and walk him a half hour before work and spend another half hour with him
Try Rover app or borrow my doggy for midday let out if not a walk. Enquire at vets and kennels too if they know anyone or anywhere that can help
Your daughter walk him as soon as she gets in from school and spends time with him hanging out after the walk until you get in
You let him sleep with you at night so he isn't alone
You take him out with you at weekends/sports whatever so he isn't alone. Walk him whilst dd is at activities wherever they are
He goes to ex house with your daughter for that week and there is a similar routine there. Its not fair for ex to just move out and leave you struggling with dog
If no-one can commit to that-including ex , then poor dog has to be rehomed.
This has gone on long enough and you need to come up with a plan this week. If thats rehoming, then that's rehoming.