Can this work as a waterproofing method?
Nail polish would work in general as a fair conformal coating. However, conformal coatings are not generally intended as waterproofing, but moisture or humidity resistance.

If you product is going to be regularly submerged or deluged with water, you are better off using a waterproof enclosure with a good watertight gland around the cable entrance.