TEL AVIV—Israel’s intelligence services are preparing to kill Hamas leaders around the world when the nation’s war in the Gaza Strip winds down, setting the stage for a yearslong campaign to hunt down militants responsible for the Oct. 7 massacres, Israeli officials said.