This kind of metonymy is very common in Latin.
For a simple example, vir mortuus is literally "a dead man" but can also mean "the death of a man".
This is somewhat similar to how summus mons can be "the highest mountain" and "the peak (= the highest part of a mountain)".
The point is that reading very literally can ...
According to Vester (1991; see the full reference below), the gerund can take an object in the following contexts:
genitive: ars scribendi (epistulam)
ablative: scribendo (epistulam) tempus tero
nominative: mihi (epistulam) scribendum est
According to Vester, "it is evident that scribendum is a gerund in mihi epistulam scribendum est, but for some ...