All the other CMS‘s are broken and don’t work properly when you upgrade them. I remember Strapi having this issue and most people I talked to would never use Strapi again.
With Wordpress you can easily transfer it to somebody else who knows WordPress and not some immature esoteric CMS system, nobody but the original developer who left the project knows about.
It’s one thing that a system is open source and it’s another if a lot of people knows about that system.
If you're primarily writing docs, have you considered a system for that (like Docusaurus) or a simple MDX (Markdown with JSX) system like Astro or Grav CMS?
The proper headless CMSes are good for managing complex schemas and relationships in a GUI. But if you're primarily documenting code and APIs, IMO being able to write freeform and easily add example snippets and maybe actually workable examples would be nice.
You can also make a pretty good headless CMS off WordPress by using Advanced Custom Fields. However, that was recently taken over by Automattic and part of their war against WPEngine. I'd be afraid of using it.
I built it because I was in the same situation as you.