When you're coding an automated process of some sorts, yes, it can be somewhat mechanical, but even then not completely. Coding is still a creative work, because there are always multiple ways and solutions to achieve your goal.
Try to tell a programmer that his work is purely mechanical, that there is nothing creative about it and you'll get smacked in the head.
You could say that coding a VN or KN is rather mechanical, because there is nothing complicated to code in there, but Ren'Py code contains all the text displayed in the game and code about how and when every scene is displayed, so unless you're writing the code to someone else's story script exactly the way he wants it, you'd likely be rewriting at least some of the sentences, replace some of the words you used in the draft and make other changes to dialogs and descriptions. And you'd be considering when do display every new scene and which transitions would you use. So it is also quite creative, even in a VN or KN, not even mentioning games that contain freeroams or some sandbox-ish content.