There were predecessors to pencils going back hundreds of years before that, with very similar capabilities. They used soft metals that streak when dragged across a surface, particularly silver and lead (Pb) (also the etymology of "pencil lead"); and sharpened these into narrow points. The modern pencil sort of iterated on those ideas. Soft graphite powder, in a wax binder, leaves a streak superior to metals; and encasing it in wood was the solution to the graphite composite's brittleness.
https://en.wikipedia.org/wiki/Silverpoint
Here's a zoomable example by da Vinci (don't you agree they look awfully similar to pencil lines?)
https://www.britishmuseum.org/collection/object/P_1860-0616-...