Did Cao Pi really not kill Cao Zhi because he wrote a seven-step poem in seven steps, or did Cao Pi not intend to fry 'Tonggen'?

Yes

Poetry Allusion of "Seven Steps Poetry"

The allusion comes from Liu Yiqing's "Shishuoxinyu-Literature" of the Southern Dynasty: Emperor Wen tried to order Cao Zhi to seven steps. Those who fail to compose poems practice Dafa. In response, he wrote a poem: "Boil the beans to make soup, and drain the bean sprouts to make juice. The bean leaves are burning under the cauldron, and the beans are weeping in the cauldron. They all grow from the same root, so why fry each other in a hurry?" The emperor was deeply ashamed.

Cao Zhi is the third son of Cao Cao. He has been talented since he was a child and is loved by his father. After Cao Cao's death, his brother Cao Pi succeeded him as King Cao Cao of Wei, and later usurped the throne and became emperor. Because Cao Pi was worried that leaving Cao Zhi and Cao Xiong (the fourth son) would cause trouble in the future, he questioned and persecuted them on the grounds that they did not come to visit when their father died. Cao Xiong committed suicide because of fear. Cao Zhi was taken into court. In the end, Bian, the mother of Cao Pi's four brothers, interceded, and Cao Pi reluctantly gave Cao Zhi a chance to blurt out a poem within seven steps, otherwise he would be killed without mercy. Cao Zhi composed this seven-step poem. Cao Pi understood the meaning of Cao Zhi's poem: if he killed Cao Zhi, he would be ridiculed by the world, but the greed in his heart still made him unclear, so he put Cao Zhi under house arrest. In the end, Cao Zhi was under house arrest by his brother Die of melancholy.