We were comparing the amount of time it takes to write a textbook versus the amount of time it takes to write all the papers the textbook cites (or relies on, I guess). So I don't think "hardness" and the fact that papers also cite other papers really changes this comparison.
I mean, a textbook might take years to write/edit (on and off) But it takes at least a month (on and off) to write/edit a paper.
But you don't think this is a learnable thing? Doing a paper, you already have to write code. Just structure it differently.
As it is, the code is often neglected. And rarely shared. Both bad facets.
And making a full text book that is executable is what I was comparing. That entire book is a program. I'd imagine that was much harder than the typical paper. Many of which are surveys and gloss over deficiency of the supporting code. (Again, I still concede the black swan nature of that book.)
I would be interested in seeing the publication times for many text books. Empirically, we should see something in the difficulty in relation to the time it took to create. Right?
Edit, since I saw your point of referencing many papers in a single page. Don't papers do the same?