Sorry to hear about your sitch! You've certainly come to the right place.
From what you have said, I think your H has always been irresponsible and selfish, only now he is more so. For instance, he should not have been smoking pot with your D, and keeping secrets from you with her. In fact, keeping pot in the house is totally irresponsible because what if he had been found out, and ended up in court or worse.
I have to ask .... do you really want this loser? Would you take him back as he is now, or as he was before? He needs some serious help with his pot smoking, and he may even have an addiction to sex. You have to realise that it's not your fault, that you cannot help him. You need to take care of yourself, and your D. You may need to end this M, and find ways of limiting his access to your D. I feel that he has abused his position as a father (even if he hasn't molested her, he has certainly contributed to leading her astray by smoking pot in her company). My goodness! WTF was he thinking?
For now, begin the process of detaching, by not being in contact with him (only about finances or your daughter), get out more often with friends and family, or even on your own - you could join a club, or take up a new sport or hobby. In other words, GAL. Try not to look at his phone records - it'll only upset you, bring you down, and make you feel bad. Just realise you cannot control him, only yourself.
Don't think of the last 24 years as wasted. You gave him your heart, and did your best, and I'm sure there were some happy moments and memories, and it brought you your precious daughter, but don't give him anymore of your time. He is not worth it, IMHO. Certainly not as he is now.
Find a way to protect yourself, financially and legally. Your WAH obviously cannot be trusted, so make sure you take care of your own business, and detach all legal and financial affairs from his. In his irresponsibility, he may overspend, and really get you all into trouble.
Please take care of yourself and your daughter. Be strong! Nothing, even this awful sitch, lasts forever. I will be thinking of you.
Me:57 H:52 M:28 Got another lawyer last year and filed. D35,S/D twins28,D22 EA4/04 End? Who knows? "Life is like a mirror. Smile at it and it smiles back at you." — Peace Pilgrim