The phrase "from within themselves" is an idiom. Alternate translation: "The Philistines hate Judah and have tried to take revenge against it by their own strength again and again" (See: [[rc://en/ta/man/translate/figs-idiom]])
Here "Judah" refers to the people who live there. Alternate translation: "to destroy the people of Judah" (See: [[rc://en/ta/man/translate/figs-metonymy]])