You almost hit your brother in the head when you threw that toy.
You nearly hit your brother's face with that toy.
この場合、次のような言い方ができますよ。
ーYou almost hit your brother in the head when you threw that toy.
「あのおもちゃ投げた時、弟の頭に当たるところだったよ」
almost hit someone in the head で「もう少しで人の頭に当たるところだった」と言えます。
ーYou nearly hit your brother's face with that toy.
「あのおもちゃが弟の顔に当たるところだったよ」
nearly hit someone's face with ... で「…が人の顔に当たるところだった」と言えます。
ご参考まで!