Yes , in the wild they learn from what the parent feed them and at fledging what the parents lead them to feed on. In captivity they do not get this training or even choice in edible greenery.
Many times the birds must learn by trial and error. Ypu are right to suspect that the reason they do not sample them, or gather for nesting materials is that they are toxic or bitter tasting. Being toxic does not always end in death. Sometimes just a bout of sickness or damage done to internal organs. Once the bird subcombs later to a failing immune system most keepers have long forgotten of the possibility of damage done by the toxins. Just like humans that get cancers, complications, allergies to irratants, so do birds. It would be best to offer known safe plants.
One thing I offer is spiderplants. My birds consume these in large amounts and seem to be totally safe...but relished. fortunately they are easy to propogate and I always have replacements. The chewed ones come back once removed. Birds fed a favored greed by the keeper or furnished sown seeds that have greened usually have their needs filled by these so they do not attack the plants as much. Unless it is a spider plant....they seem to prefer this over anything I have ever offered

I grow all kinds of stuff from carrot tops, greens of all sorts, grass seeds, cucumbers, fruits, go figure they would prefer the spider plant..