I'm so sorry your dog is having anxiety. I know how hard that can be on them and on their owners. Ideally, you'd find a way for her to make crate time enjoyable so when she has to go in there it doesn't feel like punishment, but that may be difficult because of the anxiety. The most important thing is that, unless the crate itself is causing her severe anxiety or she's harming herself trying to get out of it, it likely isn't an issue for her to be in there for periods of time. In fact, it can become a "safe space" for her. Based on what you've described I would recommend that you try to find a dog behaviorist in your area that specializes in training and helping dogs with anxiety. If you don't know of any or where to start, maybe your vet or some trusted friends or someone can recommend someone. It also might help to find a holistic vet as they often will work with you to get your dog calming herbs, essential oils, and other natural remedies rather than doggy prozac or the equivalent (not that there's anything wrong with that when the dogs need it, but I personally prefer the natural route if that works - if it doesn't then check with your vet about anti-anxiety meds).
In the meantime, some natural calming things to try: CBD treats or oil (I know many vets discount CBD but I've had a few dogs that use it that are clients and the only side effect is a calmer dog and maybe the ability to sleep better and pain reduction); chamomile oil mixed with a carrier oil - place 3-5 drops down her back; melatonin and/or valerian (this is usually taken orally and does not taste good so may have to be disguised in Peanut Butter or somethng); a drop of ingestible, high-grade lavender and/or orange oil in her drinking water; calming music or even pop music (not rock, rap, or anything jarring - keep it super relaxing or peppy); diffuse lavender, chamomile, and/or orange essential oil (just a bit - they have strong noses).
I'm not a vet or behaviorist so I can't be sure but her potty habits may be related to her anxiety. You can ask the behaviorist and/or your vet.
Good luck and I hope that she is able to overcome her anxiety.