Of what I know, primejdie (<sl., great danger, jeopardy) is a hypernym for pericol (<lat., danger, at peril), risc/k, aggravated circumstances... .
Proverb 1. Paza bună, trece primejdia rea = Forewarned is forearmed.
Signs warning of the peril
2. Pericol de incendiu/electrocutare/moarte! - Fire/electrocution/deadly danger/peril...
a) Yet, we say that persons are periculoase (dangerous), not primejdioase.
b) On the other hand, circumstances can be both primejdioase or periculoase: You are in great peril = Ești/te afli în marepericol or primejdie.
And yes, both are literary. Both are in use as adjectives (periculos/primejdios) or nouns.
We also have the verbs 'a primejdui' (no longer in daily use or rare use) & 'a periclita' (in use), meaning 'to put in danger' or we use the phrase 'a pune în primejdie' such as, 'someone's life' = to put sm's life in danger.
Highlighting something irinet mentioned already: in technical "jargon" we use Pericol (Pericol de explozie, Pericol de incendiu, în caz de Pericol, etc.) and not Primejdie - maybe because it has fewer letters or maybe because Primejdie has an archaic nuance.