This works for me, to hide big chunks of code and documentation:
/*! \cond PRIVATE */
/*! \endcond */
Run with ENABLED_SECTIONS = PRIVATE to create your internal version of the docs. You can have several conditions and enable/disable them according to the audience.
To hide just part of a documentation block, use \internal (will hide until the end of the block unless \endinternal is found)
Note: you can use @ notation if you prefer it over backslashes.