Perhaps magnesium would be better, but sodium chloride can also do the job at the cost of some side effects. And if salt is all you have tried, then your body will signal that it needs salt, because that's what worked in the past.
I highly recommend you perform a search for intracellular and extracellular electrolyte concentrations.
I also highly recommend not giving anyone advice that could threaten their health.
[1] https://www.smithsonianmag.com/science-nature/gut-bacteria-m...
Are you sure that's a logical and valid conclusion?
1) Cravings cannot be used to determine what your body needs with 100% accuracy because some of them might be caused by gut microbes.
2) Cravings should still be taken into account because most probably only a small percentage will come from cravings.
I understood you were referring to the first in your previous comment, so apologies if that was not the case.
Either way, the only research that I know of pertaining to this topic is that some yeast (IIRC candida) can trigger carbohydrate cravings. That is something you should probably never listen to, even if they are physiological. Note that I have a strong bias here as I adhere to a no-fiber ketogenic diet.