You (often) leave a lot behind. Moreso than you might have thought. The more singular your position (or, perhaps, the lower your bus factor), the more nuanced it becomes.
Institutional memory, by itself, strikes me as somewhat of a sham. As a good friend of mine once said, "documentation is where information goes to die." Institutional knowledge is the far more important structure.
A couple of UNIX "Golden Rules" go a long way to leaving a good legacy. You leave a legacy regardless, though, so it's up to you to choose what you leave.
[first update in a while] If you're out to build your own path, and you're still on the way out, you'll likely wonder if you'll be okay. Turns out, you will be. There's a lot of demand for clueful people.