There must be more going on.
After all it seems like the Klingons are in the same research speed category as the Vulcans.
In the 14th century both the recovery of Vulcan and the Hur'q invasion of Qo'nos occurred. Jump to the 22nd century and their technological levels are not that far apart.
(Please note that the Hur'q invasion wasn't that positive as it left Qo'nos resource poor, so they may have built the Ch'gran fleet but afterwards they would have to find alternative means to do the same thing as the Hur'q technology did.)
It is only when humans enter the equation and show how slow everybody else is that problems arise.
I wonder did in the 23rd century in the Klingon Empire occur a similar transformation as in the Tokugawa shogunate? We have Colonel Worf, the head of a noble house, and General Chang, probably the second most powerful person in the Empire, "playing" lawyers.
Up to the 21st century (while there was an Emperor) I am not sure about the general scientific community in the Empire. But I would say that as the power of the houses rose the scientist worked rather for the houses than for the Empire as a whole. Something like Magisters in Europe during the Middle Ages.
As to why the Klingons can keep up with the UFP, there may be several reasons:
2.) Klingon-Romulan Alliance and its effects - House of Duras and also other houses grew more powerful from their association with Romulans, they may have exchanged technology too
3.) the already stated conquering of worlds with the more advanced technology, or through xenoarcheology, or buying it
4.) no squandering: a Klingon ship needs only weapons, shields and basic sensors, warp drive ...; no need for gardens, holodecks, living quarters have only beds... on the other hand look at a Federation ship ...; if Starfleet used a more Klingon mindset and built a Sovereign-or-Galaxy-class-sized ship according to Defiant specifications we would see just how much the UFP is more advanced than the Klingon Empire (I am unsure if Yesterday's Enterprise supports or disproves this)