Take a safety course. On class III rapids you'll begin to notice boaters standing ready on the rocks with a throw bag. They are there to throw you a line if you get into trouble. You owe it to yourself and your boating buddies to be able to offer help and rescue them if needed, as you will need to count on them to offer you help. The more you kayak the better your boat handling skills will be, and advanced boating skills come with extensive experience.
Repetition also helps.
Many expert boater will run the same play spot over and over until they feel they've completely mastered it, they know all the forces that are acting upon that spot. Of course next time you run the same spot it will be different, different water levels, etc. Advanced boaters don't think about what paddle strokes they use. This comes second nature and are usually a combination of the techniques and stokes you learn as a beginner and intermediate. However they do spend time scouting and mapping out their perfect line.