I tried to get this to work awhile ago, and I think the only way to do it is to load in a completely different OS like lineage or graphene. The battery for the phone I was experimenting on started inflating though, so I didn’t get very far. I thought I had bookmarked the guide page for how to root, but I guess not. It involves setting your phone into developer mode, and then communicating with it with a special program via command line.
AFAIK this is the only way to get call recorders to work on Android these days.
I would actually pay for that. Sounds fucking awesome.