Chihuahua's are notorious for having house training issues. Not all do but the majority of this breed do. Yorkies, pomeranians and other toy breeds do as well.
First rule out a medical issue. If she can not help it you'd hate to punish her for it-right?
With that ruled out-here are a few steps you can take-
a dog show trick that is not harmful at all but is slightly gross-is to take a wooden matchstick and wet the sulfer end. Slid it just a centimeter up the chi's bottom. This stimulates the dog to immediately empty her bowel. The match comes out right away and along with it ANY poo that is in the bowel at that moment. The minute you put it in you tell her to "do her business-go potty" or whatever your catch phrase is. Do this as though she is a puppy and has never been trained.
Second you put food down at her normal hour in the morning. Take her out first thing when you get up and first thing when she is done eating. Follow up again just before you leave if you can. Upon returning home-take her out first thing. (I bet you already do anyway. Good job.) DO NOT LEAVE food with her all day. DO leave water with her all day. She will learn to eat when you put it down. Take all food and water up by 5PM. I promise this will not harm her but train her to eat when she is hungry and also prevent her from overly filling her bowels and bladder when she can not be taken out with you not home and when you are sleeping. It will also help prevent obesity.
Now-if after several weeks of this you do not see improvement and she continues to poop in your house and in her crate then you know you have a problem dog and you will nto be able to train it out of her. Consistency is key but I will tell you there are some dogs that just WON'T stop.
A dog that will poop in it's bed when it has the choice NOT TO is a very filthy animal. Dogs naturally do not deficate or urinate in their beds or near their food unless of course they have absolutely no choice or can not control it. A dog that does without medical issue and with consistent positive training is one that chooses to do so and can not be broken of it.
I know dogs! I know many dog breeds! I dog sit. I own 3 dogs right now down from four. (Forced to put one down in Jan.) Currently own a 15 year old Pom I've had since she was just six weeks old. I also have a teeny tiny pom of 3 years that weighs just under 5lbs. She has been consistently trained HOWEVER she can not hold it if she needs to go. Medically there is nothing wrong-she quite simply has a teeny tiny bladder to go along with her tiny body size. So she truly must go out to piddle every 15 minutes or she will puddle on the floor. WHEN she has to poop there are no tell tale signs and she simply isn't smart enough to let me know somehow and she finds an out of the way spot-usually upstairs far away from food and bed to go. I have to clean it up. It's not acceptible to me but I do love her and have invested a lot of time and effort on her.
My solution is to leave her outside during good weather days in secure fenced yard. When I keep her indoors she wears a custom dog diaper (bought off EBAY for a fraction of the cost the ugly petco/petsmart type sell for) and I use a maxi pad cut in half as the disposable liners in it.
I use the wooden match stick trick to void her of poop in the morning and evening if she doesn't go on her own. In this way I no longer clean up poop from my floor (unless I slip up by not letting her out when she needs or allowing her to eat at times outside her set scedule throwing off her typical schedule) and I prevent piddles upon our floors.
I HATE CLEANING UP ANIMAL FECES inside my house. You can NOT get all the pee out of carpet no matter how you clean it-it goes down to the padding beneath and even steaming the carpet doesn't remove it all. Tiny puddle or big puddle- there's a residual amount you can NOT get. Gross.
Good luck in your training and if this is too much work and you do not care to invest THIS much time in her-then I would rehome her. Just be upfront about her issues to her new owner because the next owner will react just as you have and will most likely pass her on again if they do not realize what they are getting into.
I can not tell you how many dogs are claimed to be housebroken that are not as a selling point or a giving point so the owner can rehome the dog but also find a good person for it that won't harm it. It happens constantly-everyday with all sorts of breeds.
What one person calls housebroken can vary a great degree from what another person calls housebroken. BE WARE of this! Even the nicest people can be blind and tell the white lie and DO!
Hope this helps you!