The Korean grammar structure V + 을 뻔했다 vividly depicts situations where something undesirable almost transpired. The expression often suggests that the event was unintentional or unforeseen. To accentuate the close shave of the situation, 하마터면 can precede the statement.
It's important to differentiate this structure from 거의, which translates to "almost" in English, but does not carry the same negative or unintended nuance.
The '을 뻔했다' structure provides a nuanced way to share stories of near-misses or events that almost took place. By grasping this structure, you can paint a clearer picture in your conversations, showcasing the potential gravity or significance of what might have occurred.