The book Yayin HaMeshumar explained the secret of the herem of Pinchas: when Israel entered the Land the chitzonim were subdued, and stam yeinam was again permitted, which is why Yehoshafat drank it. After the ten tribes sinned with wine they were exiled. As the Tosafot wrote, a person should first pray that delicacies not enter his body.