Maximizing the power of deep extragalactic imaging surveys with the James Webb Space Telescope