Seems like you
can turn it off completely (except it still collects some data but
does not actually send it to Mozilla), but you need to read the docs and toggle some about:config preferences.
https://firefox-source-docs.mozilla.org/toolkit/components/t...
Personally I'd just uncheck all the options exposed in the UI and trust that Mozilla is not collecting stuff behind my back, at least not data that can be de-anonymised.