Philip thanks for your answer,
regarding your comments:
I assume the portal url of Portal A is different to the portal url of Portal B?
you are correct
Also, when you copy the feature service and survey form item from Portal A to Portal B using the script, do both of those items get a new itemID?
I think so, I do not check that.
Republishing the survey via Connect and ensuring it is pointing to the correct portal url and itemID is the best way to ensure the survey works and is submitting data to the correct feature service.
So far is the correct way, but from a point of view of DevOps it is not the best way to do it, because there is no way to automate the process.
There may be other ways to create a python script to download the form item, extract it, update the contents of the files in the form item where required, zip it back up, then upload, however would need to explore this idea further to see if it would actually work.
I was trying to understand the code in Connect, but to be honest I am not good at QT code, more over, I download the code, and preparing the environment to make the code compile has take all the morning, and the percentage of progress is under the 10% (Installing QT )