A few things
1. Have your sweat rate tested. We are all different and this will help a professional figure out sodium needs during prolonged activity.
2. Triathletes sometimes use these salt tablet things. If you control sodium during eating, you can use those to be more precise on intake.
3. over/under hydration can also play a factor in the equation (also why I say test for sweat rate).
you know, up until a few years ago I would have scoffed at the idea of a sweat test, but I do know a woman rider who had this done, and it does make sense to a degree. Seeing how your sweating and hydration affects your levels in your pee and specifically how someone with specific issues, it could help by giving proper values.
I've certainly felt a huge difference in how I feel riding in very hot conditions with lots of sweating, and being proactive with bananas and either gatoraid or simply powders for hydration with diarrhea, although I realize this is helping with too low levels of stuff due to excessive sweating.
I've ridden a lot in vey hot climates, and I think I'm a lot better now for getting it right for hydrating and salt and potassium balancing, although I realize I'm winging it and don't have a specific heart issue.