The only issue that you’re going to have with this solution is if 'old_field_name' is not unique. It will cause any field with the old name to also be changed. This is the main reason that it’s pretty much impossible to build field name changes into ACF and why it has never been done despite many requests.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users