I agree sugar is not good for you, I feel one hundred percent better when I avoid sugar. I sleep better so am more alert, much less stressed, although it can cheer me up and sometimes I put it on cereal before I go to bed as it makes me sleep better, so it's not all bad.
However, I believe salt is essential, we need it. Maybe we did come out of the sea. When my father was staying with my brother, where salt, and taste, was left out of everything, the doctor prescribed a packet of ready salted crisps for him every night as he was suffering from salt deficiency. Saline drips save peoples lives, I have heard that the lack of salt will kill you before the lack of water will. Apparently salt tablets were provided to some troops during the war. Generations got by fine on a diet that included salt, I'm sixty, healthy and wouldn't consider cutting back, in cooking or otherwise.
My understanding is that the salt the media are talking about is that in processed foods and ready meals, very little of what I eat or was brought up on. That has mostly been replaced with sugar, I can taste it. I have no problem with cooking vegetables in salted water or putting salt on a meal, the former brings out the taste of the veggies and the latter is up to personal taste and what your body is asking for.
I think salt in moderation is fine, as is most things. Listening to your body and recognising it's needs is the most important thing. When I am in danger of a migraine I have discovered that nibbling salted peanuts is a better prevention than the chocolate I used to have. For me salt and protein works better than sugar.
I acknowledge that I am lucky, so far, not to have any serious medical problems that diet exacerbates.