Universal mechanism of luminescence enhancement in doped perovskite nanocrystals from symmetry analysis