First, there is a plugin that will let you do something similar to this https://wordpress.org/plugins/quick-and-easy-post-creation-for-acf-relationship-fields/ is only for ACF4 version and there is a premium version for 5.
You might want to look at how they accomplish this if you wanted to do it yourself.