What time horizon and level of abstraction is the right for the maintainable and evolvable software? [closed]

From time to time I feel exhausted in my software development efforts because I am pressed to think and develop in very specific and very short term manner. One client here and now requires one feature and I should implement it for him. Nor client, nor management of my company are interested in investing some time and effort in investigation how can we make this feature adaptable and more general (e.g. introduce configuration instead of hard coding the one branch of feature) for other clients or for future use.

From the one side this may be bad business decision. From the other side it is certainly bad HR decision. Ancient masters achieved excellence precisely because they made or built their artifacts for for the future, for the generations to come, for the eternity. Maybe software developers can achieve similar mastery and excellency if they are allowed to build software for eternity?

So – are there technical criteria (best practices, industry standards, etc.) for building maintainable and evolvable software, criteria that determines the required level of generalisation and future-proofness for implementation of specific feature?

My domain of application is accounting and business software (backoffice).