Homekit requires manual restart in Karaf to restore communication to iOSapp

Yes, that should work. See e.g.

and there are more examples.
While the above examples use ssh key-pairs for authentication your script uses password.
So the above examples can be used for the OH cron part. Just adapt it to continue to use password instead of keys.