First, let’s be clear that your food doesn’t generally contain “salt” (sodium chloride, NaCl) but dissolved sodium (Na+) and chloride (Cl-) ions, because sodium chloride immediately comes apart in water. As mentioned above, it’s the Na+ that tastes “salty” and does all the unfortunate things to your blood pressure.
Second, the “sugar” that probably most concerns you is called sucrose, and it’s a molecule made of two simpler sugars (called glucose and fructose) chemically bonded together. That’s the “sugar” you add when you cook, although there are an enormous number of other compounds that a chemist also calls “sugars,” a few of which actually taste sweet, but most of which don’t.
So you’re asking: is it possible to do a chemical reaction with the Na+ and sucrose in my food that will turn them into something else, something harmless?
Sure. Chemists have spent centuries figuring out how to do these things. The most difficult one is going to be the Na+, because sodium is a very, very reactive element, and it really, really likes to form the Na+ ion in the presence of water. It would take some very powerful and complex chemistry to prevent that. In fact, the only thing that comes to mind is some kind of fancy chelating agent that would surround the Na+ with a “cage” made up of some organic (= food-like) molecule that was indigestible, so that the sodium in its carrier cage would be carried entirely through your digestive system without being absorbed.
The sugar is relatively easy, because sugars are already pretty chemically reactive. There are many, many reactions that could be done on the sucrose to turn it into something that is harmless but isn’t sweet and doesn’t have the effect on you that sugar does.
So far so good. But now comes the big problem, and it’s almost certainly insurmountable: these are not easy reactions by any stretch of the imagination. They can generally only be done satisfactorily under laboratory conditions, with pristine starting material and very carefully controlled conditions. They are very unlikely to work well on your stove top, with all the other glop in the food (which will likely react with the stuff you put in to deal with the Na+ and sugar, producing what a chemist calls “byproducts”). Even worse, the reagents (= other chemical) that are used are going to be very expensive by your food standards. $100/kg or even $100/g are not at all uncommon in chemical reagents. Finally, in order to be 100% sure that the result is 100% safe to eat, you are going to require some very, very careful chemical analysis of the result, to be sure no nasty poison byproduct was accidentally created (particularly with all that glop in there).
In short, while I’m sure what you want can theoretically be done, it would probably involve a month or so of careful lab work and at least several thousand dollars, and quite possibly much more.
There’s a lot of very interesting chemistry that goes on in the food industry. If the whole field interests you, you can look into it and you might find it fascinating. Quite a lot of people who get degrees in chemistry, even advanced degrees, end up going into the food industry to work on problems of food preparation, preservation, and analysis.