MySql Moving from development to production into a different user
In my opinion, the logic is right in your way. I will add a suggestion to make it more practical.


Get the backup without routins. --skip-triggers, and don't add -R is it is false by default
Make a backup of routines only: --no-create-info --no-data --no-create-db -R
Edit the backup file of the routine, and create the user in the new DB
Restore the data backup file
Restore the routines backup file.