At Amazon, we would use a variety of solutions to document the build process, how to set up internal accounts, how to respond to pager calls, etc. Amazon has a custom documentation system, but it isn't a whole lot different than the various WIKIs that are available outside of Amazon. Some of what you see as documentation for AWS [1] are an evolution of internal documents from when the solution was used internally before being made public.
My time at Apple was earlier, but the systems were similar. Various internal web sites, files checked into cvs/svn/etc and assorted custom issue tracking tools.
I wish I could say there were amazing and magical tools that made documentation easy and painless, but there weren't during my time at Amazon and Apple.
There might be some very nice tools available that can traverse and document network topology and services that I wasn't exposed to. Hopefully someone will come along and let us know.
[1] https://docs.aws.amazon.com/index.html?nc2=h_ql_doc_do_v
There's support for writing out diagrams in graphviz dot but people usually just draw them in google docs or some other external program and check a screenshot of that in to be embedded in the page.
I'm sure some systems had more automation building documentation out of code directly but usually it's just the simple markdown written manually.
There's also google docs which is nicer for quickly iterating and getting reviews but it's much less discoverable and falls out of sync with the system much more easily.
https://www.google.com/books/edition/_/WXTTDwAAQBAJ
One notable practice mentioned in the book is their g3doc system. Documentation is kept in the (google3) repo alongside the things documented. It is encouraged to update the documentation and the code at the same time. This also means the full history of the documentation is available in repo rather than in a separate wiki history.
There is also a system of URL-shortener-esque "go/ links" that allows people to easily link to or jump to documentation. For example, "look at go/foobar". The docs are also exposed in their code search system.