There is an existing mechanism to deal with "I had this specific problem X and fixed it using Y" in the context of the Stackexchange network:
A self-answered question. Since you're describing implementation trouble, it's unfortunately off-topic here. Instead you should post it to Stack Overflow (IIUC)
Regarding the "deep understanding of the code" you have gained ... it's an interesting "bit of trivia" (please don't take this the wrong way), but usually not relevant to the Code Review question you're asking. As such including it in the question most probably is noise.
It's a different story if you have an extensive test-suite, which you just haven't included in the post or similar "further information" that's relevant when providing a review.
Long story short: well done with powering through on the implementation of said enhancement, feel free to share it as a selfie on SO (and link to it in your CR question). But keep in mind that this site is about reviewing code and not about "how I made X work". We don't care how you got to your code, we just care about the "result" :)