Rambam Hilchot Avodat Kochavim 11:12 writes:
הלוחש על המכה וקורא פסוק מן התורה, וכן הקורא על התינוק שלא יבעת, והמניח ספר תורה או תפילין על הקטן בשביל שיישן - לא די להם שהם בכלל מנחשים וחוברים, אלא שהן בכלל הכופרים בתורה, שהן עושין דברי תורה רפואת גוף ואינן אלא רפואת נפשות, שנאמר (משלי ג כב): "ויהיו חיים לנפשך".אבל הבריא, שקרא פסוקין ומזמור מתהילים כדי שתגן עליו זכות קריאתן וינצל מצרות ומנזקים, הרי זה מותר.
A person who whispers an incantation over a wound and then recites a verse from the Torah, who recites a verse over a child so that he will not become scared, or who places a Torah scroll or tefillin over a baby so that it will sleep, is considered to be a soothsayer or one who cast spells. Furthermore, such people are included among those who deny the Torah, because they relate to the words of Torah as if they are cures for the body, when, in fact, they are cures for the soul, as [Proverbs 3:22] states: "And they shall be life for your soul."
It is, however, permitted for a healthy person to read verses [from the Bible] or chapters from Psalms so that the merit of reading them will protect him and save him from difficulties and injury.
On the basis of this Rambam it seems like any nonsensical segula like putting a key in a challah or eating an etrog to facilitate childbirth is essentially advocating a prohibition of divination or however you want to translate Nichush.
I myself am not a kabbalist, so can someone shed some light on how segulot similar to those found here are halachically permissible?
To clarify, my question is not where we see examples of segulot being used in classical literature, but why they do not fall under the Rambam's prohibition of Nichush as seen in the example above. I am asking about practical segulot rather than strange procedures advocated by the Gemara in various places, because those passages can be understood as non-literal in nature.