While I completely agree with your principle, I find myself interested in shimming the not-yet-standard "sticky" positioning, which is in draft specifications and available in bleeding-edge [0]. Depending on how many items use it, you would have to write your scroll handlers carefully.
In cases where this would really improve usability, I consider it an exception to my general antipathy towards "bells and whistles", since it will be native before too long.
Your comment fits the general pattern of "I want to keep it simple but if I could just do X" which is entirely valid from a UX perspective and the reason why any generalised janky buster is a good step forward (assuming it does the job, and with minimial overhead).
In cases where this would really improve usability, I consider it an exception to my general antipathy towards "bells and whistles", since it will be native before too long.
[0] https://developer.mozilla.org/en-US/docs/Web/CSS/position