I’m actually unsure if there’s any specific group of people that are affected by a weakened brain immunity.
Since only one case of covid-19 encephalitis has been reported, SARS-CoV-2 is not a ‘general’ brain pathogen. It’s probably opportunistic, like how Staph — a skin bacteria — causes infection in other organs when the immune system is compromised. So, theoretically speaking, SARS-CoV-2 shouldn’t have caused brain infection if the brain immune system stays strong.
Many things can compromise brain immunity. A poor diet or some underlying medical condition can contribute, which may compound (or interact) with genetic factors. People vary in their susceptibility to the negative consequences of nutritional deficiencies due to genetic factors, for example. Likewise, different things can weaken the brain immune system in different people.
Hopefully, my answer is not too confusing. And thanks for the thoughtful question.