If you go in for prostate surgery and the nerves get damaged as a result of the prostate surgery the nerves can indeed eventually heal and grow back after the prostate surgery.
However the nerves will be slow to grow back and regenerate so it could take 10 to 20 years for the nerves to grow back to where they were before you had the prostate surgery.
My dad went in for prostate surgery about 5 years ago now and he didn't have any nerve damage but it is possible even though the surgeon is really skilled or even when a robot does the surgery.
Still the nerves being damaged after prostate surgery is not all that bad and they will usually heal but if you have a chance of getting prostate cancer or you're getting prostate cancer then it would be better to have your prostate removed through prostate surgery before it kills you.
I would rather deal with the nerve damage from prostate surgery then the cancer.