Chemically speaking, sodium and potassium are very, very similar, and also pretty common, and our body needs both.
Due to their similar electrical properties in particular, they are used as kinds of 'counters' in some processes in the human body, as they can be distinguished to some extent by other processes, and the balance of the two is important.
What it is important to note, however, is that more potassium than sodium is needed, so an overly-high-potassium diet is rarely considered a health risk, even if only due to it being infrequent. People tend to be potassium-deficient rather than sodium-deficient.
Generally speaking, unless you are consuming way too much of both, having a potassium surplus is less problematic than a sodium surplus, and harmful effects certainly don't "stack", at least not trivially. Rather, extra potassium will tend to offset extra sodium, ameliorating rather than aggravating health effects.
Even so: All of this can vary wildly with general diet and other factors, so the prudent thing to do regarding ones sodium/potassium balance is to see one's doctor and have blood work done.