にひかれるところだった

was almost run over by

→ に
phrase Rare #34,096
was almost run over by Used after the vehicle or other cause. Often paired with 危うく or もう少しで to emphasize that the person narrowly avoided being hit.
JA: さっき、車にひかれるところだった。
EN: I was almost run over by a car just now.