[verb て-form] + いる + ところに / ところへ [verb (dictionary form)] + ところに / ところへ [verb (volitional)] + としている + ところに / ところへ [verb た-form] + ところに / ところへ
ところに or ところへ says something turned up at a particular moment: someone arrived, the phone rang, help came. The verb before ところ sets the moment, and the second half says what happened then, usually something you did not plan for.
The second half is something that comes to you or happens to you, so it is often くる来る, とどく届く, あらわれる現れる, かかってくる or a passive. ところへ means the same, and its へ suits a second half where someone comes towards you.
いいところに and ちょうどいいところに, with no verb, greet someone who has turned up at the right moment.With ところに, something arrives into the moment. With ところを, the moment itself is the object of the next verb: someone sees you, catches you, or stops you in the middle of it.