Electrical junction box under the sink gets wet
Under the sink is where it is supposed to be, but without a photo we can't tell if it was done right or not. The real problem however is more likely in your plumbing leaking and getting it wet.