Grammar
N1AI-drafted〜ては〜ては
doing A and B over and over
Formation
V-て形 + は + V、V-て形 + は + V(同じ組み合わせの繰り返し)
Usage
Two contrasting or paired actions are repeated again and again, often suggesting effort, frustration or a monotonous cycle. It usually appears as 「AてはB、AてはB」 and ends with 〜ていた/〜を繰り返した. Common in narrative and descriptive writing; the nuance is the repetition itself, not a condition, so don't confuse it with conditional 〜ては (if/when).
Examples
手紙を書いては消し、書いては消しして、夜が明けた。
てがみをかいてはけし、かいてはけしして、よがあけた。
I wrote and erased, wrote and erased the letter until dawn broke.
子どもは積み木を積んでは崩し、積んでは崩して遊んでいる。
こどもはつみきをつんではくずし、つんではくずしてあそんでいる。
The child plays by stacking the blocks and knocking them down, over and over.
彼は転んでは立ち上がり、転んでは立ち上がって、ついに完走した。
かれはころんではたちあがり、ころんではたちあがって、ついにかんそうした。
He fell and got up, fell and got up, and finally finished the race.