From someone with (close to) zero experience with either:
separate the creation and removal of the ES Domain into a separate job/project, and depend on the resources from that in the "main" job that you're interested in?
So you'd have jobs:
• "create" (that sets up the ES Domain, and whatever else beyond that you need)
• "test" that does whatever you want, and destroys most of components at the end
• "teardown" (or cleanup, you get the idea) that at it's own pace removes the ES Domain