[後「あと」]で => After V1, V2 N5
Time
〜がさいご(が最後) => if you do... negative result N1
Decisive (resolute decision)
~ひょうしに(~拍子に)   => the moment [A], unintentionally / inadvertently caused something to happen N1
に越したことはない => It’s best that, There’s nothing better than ~ N2
たが[最後「さいご」] => Once A occurs, B happens N1
Information, Report
に[越「こ」]したことはない => It's better if A, it's better if it's A N1
Comparison/ Exchange