I think, unfortunately, this is something which requires the development of good taste: the ability to distinguish good abstractions and clean implementations in advance of their creation, to direct it. There is little replacement of experience in this endeavour, and most time people spend learning to do software engineering pays no attention to it. Intentional analysis of existing projects and developing your own new things is incredibly helpful for this, and the sort of development we recognise in the workplace we may recognise but fail to prioritise and reward appropriately.