OP, I know what you mean. Usually these narrow runs are fairly flat pitches where you'll need to go straight to maintain speed, but from time to time you'll run into a moderate pitch. 2 big things are confidence and not target-fixating on the edge. Keep your eyes ahead and not peeking over at the edge constantly. As we all know with snowboarding your body follows your head. If you want to practice just find a wider run and try to maintain a straight path with turns instead of turning across the hill.
I ran into this in colorado this past march, the run below was narrow at the top but a fairly decent pitch up until 30 seconds then it flattened out. Mostly bothered me as I have a mild fear of heights, it's odd because we rode the slope to the right of the edge but still was a weird feeling riding along the ridge. It looks wider due to the gopro wide angle lens. Since you said you sometimes slide on one edge the whole way it mostly sounds like a confidence issue.