Mission Planning for autonomous climb and glide back to ground

I am participating in a competition where the mission profile is as follows:

The aircraft must fly with motor on (throttle applied) for 4 minutes. During this time, the aircraft should climb and gain as much altitude as possible. After exactly 4 minutes, the throttle must be reduced to idle, and the aircraft should glide for the maximum possible time. Finally, the aircraft must land with the throttle at idle.

One challenge is that 4 minutes is a long powered flight, and the aircraft is expected to climb beyond visual line of sight. There is also a risk of RC signal loss during the mission. Because of this,

I want the aircraft to operate fully autonomously using a Pixhawk running ArduPilot(not a requirement in the competition)

My question is: what is the recommended flight mode or mission strategy in Ardupilot for this?
Should this be implemented as a fully AUTO mission,Loiter Alt, or is there a better or safer approach for handling this scenario?