You can assign the reporter when the subtask is closed or done. Please go through the below blog post on how to achieve it through script runner and groovy script.
It looks like there are a number of plugins in jira that might be able to help with this. First the plugin Quick Subtask for Jira appears to be able to automatically set the reporter of a subtask to be the parent reporter according to their documentation. However it looks like that might just be useful at the time of the subtask creation.
If you're looking for something to change the reporter during other transitions, then I'd recommend looking into Scriptrunner as a means to use a script to do this. It looks like there have been other posts here on community in the past that have requested very similar functions and provided some scriptrunner scripts: See https://community.atlassian.com/t5/Product-Apps-questions/Using-Script-Runner-post-function-to-change-the-reporter-of-a/qaq-p/40806 for one example.