Cross Correlation of Pencil-Beam Galaxy Surveys and Line-Intensity Maps: An Application of the James Webb Space Telescope