The formula is simple: It follows a similar philosophy to the Chinese paintings of the Ming(?) dynasty. The goal is to paint a picture of what’s missing, so that the unsaid element is perceived more directly than the words. So, imagine something you want to describe, then remove the main element you wish to convey. Then, find a combination of words which makes this omission glaring. That “glaring” quality will provoke the sense of astonishing beauty that we feel from good haiku.
I am finding there is a difference between merely “short poems” and “haiku”. If we define haiku as provoking that startling element of sudden understanding, like standing in a room and realizing of a sudden that no one is male. I think this is the reason why Zen loves it, in fact since koan and zazen are aimed at the same experience. Good haiku is a good experience.