Back in 1988 at Gatwick, CO31, a B742, had a No 4 engine surge and loss of thrust at very close to MTOW on lift off and the FE immediately commenced fuel dumping. Aircraft pitched up to 22 degrees and descended towards rising ground before establishing a climb profile and reaching a safe height.
AAIB report:
https://assets.publishing.service.go...989_N605PE.pdf