That’s a tough situation and sounds like you are trying.
A few suggestions from me- does he wake up throughout the night to take the dog out for a toilet break?
is the problem the dog can’t control it’s bladder etc or that it hasn’t been taken out for a long time so needs to relieve itself?
If the former, Can you put down puppy pads and try to train the dog to use those only in certain areas. I know this is still not solving the problem but atleast it is contained to those areas and with a baby on the way you can shut those areas off to the baby when on the move.
if the latter, and especially since the dog is being left more than a couple of hours a dog walker atleast every 4/5 hours to break up the day for it & to take him out to relieve itself.
when you have the baby your focus (rightfully) will be on it and yourself, but I found I went on daily, sometimes twice a day walks with my baby. Getting out for exercise and fresh air did me & the baby so much good. Is there a possibility you can take the dog with you?
lastly, I have found having a cat and a dog (my in-laws dog which my daughter sees three times a week) has done her so much good. She absolutely loves them and I know they are supposed to help avoid any potential allergies and she will grow up having respect for animals, I appreciate this may not be on your radar or priority list but just a positive to help out!
lastly, it sounds like a stressful situation and we’ll done to you for not demanding your partner get rid of the dog but try to take a step back and focus on yourself and the baby and leave the above to your partner to deal with. Explain this to him and why you are doing it. I hope things work out