My suggestion here is twofold: first, level up when the story asks for it, disregard XP completely; second: don't play "fodder" encounters, like "there's 30 crew members on the ship, they will surely put up a fight" - yes, a fight they will lose because they're mooks and we don't really care about that part of the story, we want to see them dealing with the captain and with the imperial guards escorting them --> this leads into "a questline has as many encounters as the story dictates".
(That's my two cents that I don't apply either, anyway.)