I don’t think bad pellets are the reason for choking. She’s probably choking because she loves the pellets and is chomping it down too fast. Kurotta used to do that when I put his pellets in the bowl all at once. Try scattering the pellets instead or using treat balls. You can make a simple treat ball with a toilet paper tube and put the pellets inside so she has to slowly work her way to it. Example: https://www.instagram.com/p/BicAesNlXPg/?hl=en&taken-by=kurotta.bun
I personally have experienced pellets going bad though. I bought the biggest bag of Oxbow Adult pellets (it was more worth the value), thinking of feeding it over a year. Initially I took the pellets straight from the bag, but about a month in of constantly forgetting to seal it back, I decided to store a portion in a separate sealed container and just kept the main bag sealed until it’s time for a refill.
Another 2 months go by and I found small reddish-brown bugs (they looked like beetles) in the sealed container. I opened the main bag and to my horror it was INFESTED with the same bugs. Ended up throwing the whole bag away – there was about half a bag left and it hadn’t even reached the expiry date yet. Now I just buy the smaller bag lol.