Since MS Office includes a very good freehand math formula function, it is possible for libre office to include such a feature using the The Freehand Formula Entry System (FFES) which is open source and ready https://www.cs.rit.edu/~rlaz/ffes/ Please consider it.
On Windows you can use the system tool "Math Input Panel" from the "Windows Accessories". When the formaul is in the clipboard by this tool, use in modul MATH the item "Import MathML from Clipboard" in menu Tools. The mentioned "Freehand Formula Entry System" cannot be used by LibreOffice because "GNU Public License (Version 2)" is an incompatible license. LibreOffice can use "Mozilla Public License, v. 2.0." or "Apache License, Version 2.0", for example.
I'm somewhat surprised seeing Math formulas preferably hand-written. Isn't the markup language more efficient, precise, common? Anyway, all these handwriting recognition is rather science fiction (not really fiction but matter of investigation). I doubt any tool or library is ready for production. Once it is, we surely could add it to the app. Another question: how do you write? I mean likely not on the desktop with a mouse. Side note: speech recognition should come first, also for Math formulas. See bug 69039 for this.
On Windows, you can use the "Math Input Panel" of the "Windows Accessories" . Finish it with the "Insert" button. That puts the generated text into the clipboard. Then use Tools > 'Import MathML form Clipboard' in the Math module in LibreOffice.