What do you think thermal pads, thermal compound, and cooling plates are for?
Paste/pads is to improve surface area contact as surface irregularities in hard metal surfaces introduce air gaps, while thermal interface materials are pliable enough to fill those gaps. In other words, paste is better than air and should really only be having to wet the surfaces and not prevent direct contact where it's possible.
I stand by my point - introducing an extra layer is actually acting as an insulator as the heat is having to transfer through an extra medium and extra imperfect contact points that it otherwise would not have had to. If adding a layer like this improved heat transfer, then adding a dozen or a hundred more should improve it even better (which obviously it does not, because that would be absurd.) To think of it another way, the best possible contact point between two metal surfaces would be to have them be a single piece of metal, which is effectively what you already have without additional shims.
If the shim is actually improving cooling performance somehow it would be due to another reason, such as by introducing additional tension on the retention mechanism of the heatsink, resulting in more force being applied to the CPU.
I've noticed several design suggestions in your code.