The train arrived on time, so we didn't have to wait at all.

Literal

Train [topic-は] on-time [adverbial-に] arrived. Therefore we [topic-は] entirely wait necessity [subject-が] was-not.

Two-clause structure linked by それで ('and so, therefore, because of that'). 全く~ない ('not at all, absolutely not') is the emphatic negation pattern: 全く + negative predicate. 待つ必要がなかった ('didn't have the need to wait') is the nominalized-need construction, equivalent to 待たなくてもよかった but slightly more formal.