Just responding to a recommendation of magnesium being good for us. A key to ALL aspects of health and life is moderation in all things, as you say. I’m personally not into supplements though I do take a few, as doctor recommends. What I do recommend is full transparency on all aspects of what you do between yourself and your doctor, not just once but pretty continuously. This not only reminds your doctor, but lets them know if there’s anything potentially building up to recheck.
Our body tolerates just about everything if we limit the amounts of those things that can hurt us, if eaten in abundance.
Many of the foods you list there are very high in selenium also. I just bought three bags of organic Brazil nuts.