Close coupling of the peeling ballooning and external kink modes in high poloidal-beta discharges with strong shape and large pedestal width