When reviewing the nature of the pieces of various chess variants, namely the xiangqi cannon, I asked about its history. I was surprised that the dates of its mentions did not match 8th century Xiangqi and the invention of the cannon in the 12th century. What piece is that the one mentioned in the writings from before the 12th century about the Xiangqi, which is supposedly the cannon?
The character 砲 (pào) gives a significant clue: compared to 炮, which is homophonous, the radicals of these characters are different. 砲 uses the 石 radical, which means stone, and 炮 uses the 火 radical, which means fire.
Although cannons were not yet invented until, as you say, the 12th century, trebuchets -- weapons of super long range that used stone -- predates the cannon by hundreds of years.