I have another question.
As you mentioned above, the point is that in formal sentence, the relative adverb should relate to the main clause , right?
The relativized element needs to come from the main clause of the relative clause, not from the main clause of the sentence. This rule only comes into play when you are dealing with relative clauses that contain adjunct clauses.
Those were the parts where, if a plane was struck by a bullet, it would never be seen again.
In your example, there are three clauses. First, there is the independent clause. That is the sentence as a whole. Apart from its two embedded clauses, that clause is "Those were the parts."
Next, we have a relative clause modifying "parts": "where, if a plane was struck by a bullet, it would never be seen again." The main clause of that relative clause is "where it would never be seen again."
The relativized element should come from the main clause of the relative clause, but it doesn't. It comes from the "if"-clause embedded in the relative clause, which functions as an adjunct. That's why the relative clause is not so good.
I guess this could be a grammatically superior version:
- Those were the parts which, if a plane was struck by a bullet there, would result in the aircraft not being seen again.
or, perhaps better:
- Those were the parts which, if struck by a bullet, would lead to the plane not being seen again / Those were the parts which, if struck by a bullet, would lead to the loss of the plane.
The revisions Gustavo has proposed are indeed grammatically superior. He has used a relative pronoun ("which") rather than a relative adverb, and the relative pronoun functions as the subject of the main clause of the relative clause ("which . . . would lead . . ." / "which . . . would result . . .").
The "if"-clauses embedded within the relative clause of his revisions ("if a plane was struck by a bullet there" and "if struck by a bullet") do not have a relativized element. Although the version with "if struck by a bullet" has an understood subject and verb, the relative pronoun does not relate to that clause.