Sounds like a challenging hillclimb, each terrace as you describe, would scrub most of your momentum for the next slope. Level to a 40 degree climb is pretty extreme, can we assume that the transitions from flat to the slope are more of a rounded transition?
I assume you have no problem with the first slope and have adequate momentum to climb to the first terrace? Your problem is your losing your momentum on each terrace making it difficult to climb the next?
I would approach the first climb standing, to use my legs as suspension for the G-Out. Then as the bike transitions from flat to climbing I would move my shoulders further forward, so that my body is vertical to the fall line, like it would be if I am standing on the slope and facing the hillside. I would stay on the gas allowing the front wheel to crest in the air, however, not so fast that I would jump. As the front wheel rises in the air, and the rear wheel gets close to the lip, I would pull the clutch, down shift one or more gears and drag the rear brake to bring the front end down and allow the rear wheel to roll over the crest trying to get it on the ground ASAP. Now I would sit to weight the rear wheel, to get it to bite the ground, letting the clutch out in a deliberate manner as to keep the rear wheel hooked up trying to get the bike to launch, as if I am coming out of a starting gate. Shoulders forward, but heavily weighting the seat. If traction is limited I would be seated a little further back. With good traction I would be more forward on the seat. I would most likely stay seated, shoulders forward, trying to maximize my weight on the rear wheel to keep it hooked up and driving. Or I would use the energy of the G-Out (transition from flat to slope) to seat bounce me into the standing position (vertical) shoulders forward of the grips. Then repeat for each terrace.
Coming down its all about standing and weight back. Whether I would jump of each terrace and push the front wheel down in the air for the wheels to contact the slope at the same time would be depend on my ability to control speed upon landing, can I scrub the speed for the next terrace or would I gain speed and crash and burn? Let's assume this is steep enough that even the best riders would not jump off each terrace. Approach standing, as the front wheel rolls off, move your hips back over the rear fender. The rear should come up to your butt, if it is hitting your butt and driving you up and creating the feeling your going over the bars, your butt is to close to the rear fender, create a bigger gap to allow the bike to rise. You need to be using your front brake like a anti lock braking system, hard on the front brake, but not so hard it skids, just almost skidding. Some rear brake, but not so much it skids.
You should have the ball of your left foot on the peg. Your right foot, your arch will be on the peg as you need to cover the brake pedal on the decent. Flair your heals out away from the bike a little, then squeeze the tank/seat with your knees. Now with your left foot only, push your heal down and keep it level, as if you would be standing on a stair, not horizontal to the slope. Your left knee will be a inch or two further back than your right knee, since your right foot will be working the brake. What your doing is using your left leg muscle to help keep you back over the rear fender. Your gaining leverage by pushing your heal down.
Visualize a childs teter-toter. The bike is the teter-toter, the pegs are the fulcrum. When your front wheel drops of the the edge, if you do not react the bike is going to pull you forward and make you feel like your headed over the bars. Back to the teter-toter, your standing at the fulcrum facing one child and they are going up and down. What would you do to maintain your balance? Would you do nothing, just stand vertical in relation to the teter-toter or would you move and stay vertical in relationship to the ground to maintain your balance? You want to stay balanced, as the bike changes angle beneath you.
Elbows (decent) should be locked to keep you back over the rear fender. You can use your shoulders to make small directions adjustments, as needed with the handlebars. If bumpy I would allow limited movement in the elbow to absorb the bump(s). However, not enough movement that would force my weight forward and down onto the seat.
You should master the use of the front brake on flat ground.
You can also practice balance on flat ground.
Then practice riding off 1-3 foot drops.
You can practice steering with your shoulders on flat ground as well. Just lock you elbows and move your shoulder to change direction.
Best to practice the skills on a flat open area before trying to execute on a steep hillside.