since part of the disphragm is working (or you've be on a ventilator) I guess that muscle could be strnghtened with training - like top athletes do - basically provide resistnce when breathing which makes the diagphragm work hard - like lifting weights. You can get gizmos to breathe through that you can adjust to incerase the resistance as you get stronger. A physiotherpist specialising in breathing should be able to help. You'd also want to make sure you learn to diaphragm breathe rather than chest breathe. It's quite possible the diaphragm is working fine but it's so weak from chest breathing that it does a poor job. Don't settle for anyhting like 'the damage is done you have to live with it'. Get onto the training! I went through someting similar after an esophagus operation that was blamed. all the best!
Yes, function can be partially restored by surgery.