The question you've mentioned does
not look like an official sentence.
Nevertheless, noun modifiers (both participial phrases and relative clauses) regularly modify far away nouns.
Since you've specifically asked the usage of "which", following is an official sentence:
Emily Dickinson’s letters to Susan Huntington Dickinson, which were written over a period beginning a few years before Susan’s marriage to Emily’s brother and ending shortly before Emily’s death in 1886, outnumber her letters to anyone else.
In this case, which does not modify Susan Huntington Dickinson for two reasons:
i)
which just cannot modify a
person ("Susan Huntington Dickinson" in this case);
which can only modify
non-persons.
ii) The verb for
which is plural ("were"). So, it is clear in this case that
which can only modify something "plural" (in this case
letters).
p.s. Our book
EducationAisle Sentence Correction Nirvana discusses
modifier issues of "which", their application and examples in significant detail. If you or someone is interested, PM me your email-id; I can mail the corresponding section.