"At the risk of their lives they had done x" is perfectly idiomatic. " Your other uses of "risk" are also okay. " I'd say "at risk" is an idiom.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
AvangiDo you have it listed at the end of your noun entry for "risk"?Yes, M-W has it.
1: At the risk of their lives they had driven into the desert.
2: In this hospital patients are at risk of further infection.