If you are lucky/good and conditions allow you can boost out through the top as described already, either looping the kite or with it at 12-2 o'clock.
Keep in mind if you have an overhead plus wave, it will be moving you at least as much as the wind, even if the wind is 20kts or so.
So it's a challenge to keep the lines tight.
As far as my experience tells me, whether the wind is side, side-off or onshore, you are going to at the least send the kite back hard, once you are in the "oh shit" zone, downloops are usually ineffective whether due to bad positioning, lack of tension in the kite, etc. Can still be an option if the kite is high enough, but the wave will catch up again and your kite may or may not climb fast enough.
So you send the kite back hard, and if your steeze karma is up, pop over or through the lip and land without uncontrolled spinning bodyslam.
If wind is light, angles aren't right or timing is off, the wave will still eat you but as the kite has been sent out to sea, the wave dragging you will keep tension in the lines so kite stays up.
As the the foam clears, enjoy flying your kite from underwater if needed. Then you will probably get to practice simultaneous bodydrag/duckdiving through the rest of the set.
Unless really big, then you are still wrecked.
If there are a lot of closing sections, consider a surf leash (and helmet). Last surf sesh for me I didn't bring the leash and with 50-100m wide closing out OH+ sections, I spent half the time chasing my board. Still one of the best sessions of the year though.
Also, while short lines may be the most fun/stylish, a 25m set can help you keep the kite flying in clean air, when the waves jack up, and buys you extra reaction time when things go wrong...