Any of the above may have caused your frog to become impacted assumeing that is what it died from.
Spagnum is common but sheet moss is preferred for that reason. Also try eco earth or coco fiber as a substrate. Why are there small stones and bark in your terrarium are they needed?
And what plants are you useing some are poisoness to frogs?
Also did you recently add new frogs to the home... quaranteen is recommended before introduceing any new frogs to the habitat incase of toxins or diseases.
Also new frogs can cause stress. How big is your terrarium?