Writing good documentation is hard. Remember that you are writing for humans. that it might be the first time they are seeing the code like the one you are describing.
Everyone has at least one example of good documentation. Write your documentation as that example, they way you would want to find it. [[Explain in plain words]] as everyone might not have the same level of knowledge as you do.
There are tools that help with generating documentation, but it does not help you write good documentation. Generate documentation when possible, but put in extra effort to make it good.