Writing on the earth or in the road dust is mentioned in m. Šabb.
12.5: If someone (on the Sabbath) … has written in the road dust בַּאֲבַק דְּרָכִים or in anything at all in which it does not
endure, he is exempt from punishment.… If someone wrote a letter on the ground בָּאָרֶץ and one on the wall, … he is exempt from
punishment. (Hermann L. Strack and Paul Billerbeck, A Commentary
on the New Testament from the Talmud and Midrash, ed. Jacob N. Cerone, 4
vols. [trans. Andrew Bowden and Joseph Longarino; Bellingham, Wash.: Lexham
Press, 2022], 2:598)