How often do you take her out to go potty?
When she goes potty outside the house, do you praise her a lot?
I just adopted a 7 year old chihuahua who wasn't potty trained and peed in my room, on my bed,
and pooped on the floor in my room, especially after a walk.
He just didn't understand this is not OK because this is the way he grew up.
So I started taking him out every 2 hours.
I tell him "let's go pee pee and poo poo" (I do repeat it few times as we are getting ready), so he would learn it's time to go potty outside. I repeat the "let's go pee pee and poo poo" again and again to make sure he is aware that this is what we are doing now, that I need him to go potty, and that's our main goal for now.
We are not going to walk to the park or chase rabbits.
When he goes potty outside, I praise him like if he just won a marathon, and tell him few times "good boy, good poo poo!!" And I pet him and i am very very happy.
And his eyes shine, he is so happy that I am happy, he knows he did something good, and he's happy and proud, and we do this about 7 times a day.
I do not ever yell at him when he pees or poops indoors, I just clean it up.
Each dog is different, some of them take longer time to learn.
But most of them can not hold for a long time.
Yes, I have met people who leave their pets home alone for 12 hours each day and they expect their pet to HOLD it, because they were told, that well behaved dog can hold it.
I am not in agreement, but that's me. I can't imagine leaving my dogs alone for more than 4 hours without them being able to go potty. But again, that's me. My dogs are not toys.
So really try to take your pup out every 2 hours and praise them when they go potty.
Also, some dogs need a LOT of time to find a spot to poop outside! They just won't poop in any available spot, they need to find the special spot. So after a 30 minute walk, your dog still hasn't pooped, and you think they don't want to poop, just to come home and the dog poops on the floor or in the crate.
They are not doing this on purpose or to mess with you or punish you. They just couldn't find a spot and couldn't get to poop, but they are ready now, just as you came back home. It happens.
Good luck!
If this is not the case at all, and you have done all this, I would suggest taking your pup to the vet's office for an exam.
I wouldn't give her a smaller crate. I do suggest seeing your vet, there could be an underlying issue.