Android is Linux.
Security is always a concern.
I am going to attempt something like this. I will likely create (or reuse) a Linux audio driver allowing the output to be routed however needed. My idea is to syncronize and aggregate devices as a multichannel (or mirroring) virtual interface.
As a musician I would have use for it, also it could be used as a virtual splitter (eg. me & wife on train watching video on her phone, her headphones plugged into hers, mine into mine, sync'd via bt or wifi)
I don't know if I will succeed. Likely root will be required. If you're interested, get in touch.