A small group of core devs actually release the code, who takes over if they are gone?
Literally, anyone can contribute if the current developer is all gone. To be realistic, they are all won't simultaneously be gone, I believe the code will be maintained by future developers who are trusted by the community or the current dev might vouch who are have an excellent understanding in regard to the codebase.
After all, the word of a small group you used actually isn't so small if you look just above your post. And if you look at the current Bitcoin repository, there are
842 contributors who at least once contribute to the codebase.