The way I see it, this is exactly what life is about. Do you want to make a positive impact in society? Then share your knowledge, your experiences, your creations. People will try to capitalize on your work, and they might even get rich from it, but oh well. It doesn't take away from your own contribution to the ongoing story of humanity.
I don't have or want kids, but I see my existence in society and free contributions to the "collective consciousness", such as it is, as my legacy. For me that's comforting. I'm choosing to be part of something bigger. If I just disappeared from society and lived like a hermit, or if I buried myself completely in my day job working for capitalists and not producing anything outside of that, I think I'd lose my sense of meaning.