wish help you to fix your issue for sharing your ideas! We've considered this type of approach. You can actually simulate this sort of behavior by structuring your data so that there is an "unvalidated" tree and a "validated" tree.
How to write a Gmail extension that will intercept and process outgoing emails?
should help you out You can route ALL outgoing mail to another mail server using outbound gateway setting or outgoing mail that matches certain criteria using content compliance rules. OB Gateway: https://support.google.com/a/answer/178333?hl=en
Android: which api to use to record all incoming and outgoing call (Since in changelogs Android blocked call recording)
To fix the issue you can do Android disabled the api with their security update policy. Looking at the permissions list the closest you can find is the MANAGE_OWN_CALLS, meaning that the best solution for you is to implement a standalone application for calling where you should be able to interact with microphone directly.