Developer incentivization: in-protocol contract author fee rebates

It would be great to find a way of doing something like this, less repetitive code on-chain would be nice.

Is there a significant financial incentive for contract writers to use libraries? There are a number of technical reasons to use a library (reduced development time, battle-tested code, etc.) but all of these are in place today and yet I rarely see code that refers to on-chain libraries.

How would this stop developers from building the bulk of their contract as a library and then calling it from a thin layer that is the public face of the contract, thus reclaiming a chunk of fees and creating an incentive for them to build inefficient code?