I am second guessing my worldbuilding, and my brain is just wondering if it is scientifically possible and/or would break suspension of disbelief.
Edit to clarify: I mean compounds that are molecularly the same.
I am second guessing my worldbuilding, and my brain is just wondering if it is scientifically possible and/or would break suspension of disbelief.
Edit to clarify: I mean compounds that are molecularly the same.
Definitely yes, as long as the alien life is carbon based (which is by far the most likely option).
Cyanide compounds are pretty likely, if not inevitable to occur in some alien life, given their simple chemistry. If nothing else, alien "plants" could be filled with it as a byproduct of their biochemistry, not an intentional pesticide.
Capsaicin is a very complex molecule, so it is far less likely to be evolved randomly as a pesticide. It is also fairly specific defense mechanism: it is harmless to birds (which help spread the seeds) but a spicy deterrent to mammals (which would masticate the seeds and thus destroy them). So you need a similar justification why a "plant" evolved to contain capsaicin, as it is neither an attractor nor a pesticide but a selector: so what is the plant selecting for?
Caffeine and other mildly psychoactive/poisonous alkaloids are pretty easy, plants "invent" them all the time to fend-off minor pests. Any carbon-based ecosystem with "plant" and "insect" equivalents will likely develop those in great variety and quantity.
Now, if the goal of having those in your world is for humans, or human-equivalents to use these recreationally (maybe except cyanide, its recreational use is largely limited to achieving widowhood quickly ), you might want to consider that while the presence of these chemicals is likely to occur in the alien ecosystem, the dose might be disagreeable with humans. There is no reason why an alien plant could not produce caffeine, cocaine, or even theobromine in concentrations that would kill a rhino, nevermind a human. If the "plant vs pest" war in the alien ecosystem is more brutal than in ours, the alien coffee beans could be as deadly as the cyanide, and their hot peppers could make California Reaper Pepper feel like a marshmallow in comparison.
Also, consider that an alien planet can have flavorful alkaloids and other edible substances that do not occur on Earth, or occur only in otherwise inedible plants. Maybe they have a plant that produces vanillitoxin equivalent, which would taste like vanilla but burn like a Ghost pepper, while also "taste" like mild electrocution?