Welcome to YT!
Mizti was 4 y.o. when she came into my life (via my new husband) and she was not potty trained. She just went wherever she wanted to and my husband cleaned up after her (he's such a good guy!). Since I'm at home I took it on to potty train her. It's 5 years now (OMG time just flies!) and we still have 'accidents'. I have her on a regular schedule and don't relay on her telling me. I had to learn to read her signs and just live with some little paddles and peanut sized poops.
About the hiding in the closets: Mitzi does that too since she was a little baby. It's her private time and she spends there about 5 hours a day sleeping. Dogs have to sleep 14 to 20 hours a day to stay healthy. At night she sleeps in our bed and the rest on the couch - sleeping.
Kudos to you for taking in your baby after a hard life!