Yeah the paradox here is that employees on their way out are less likely to be forthcoming in sharing their knowledge, while current employees aren’t super incentivized to be thorough, as it functionally makes them easier to get rid of.
So the employer either needs to be surveillant and somewhat hostile, taking data from Slack messages etc. Or they need to have a culture which prioritizes documentation as a part of daily routine.