You are almost right Two out of three is pretty good.
Jesus — being God — knew from the beginning (read the prologue to the Gospel of John) who his mother would be. She was given the gift of sinlessness in advance of her birth by God. Remember — there is no timeline as we know it with God.
In no way does scripture indicate her sinless. If anything she felt grace precisely because she was a sinner not worthy of the honor. If she were sinless, then of course she would be chosen.