DD was born 23w6d and developed NEC at 4 days old. She first had a procedure (can't remember what it's called) that was mildly invasive, but failed, so at 5 days old, she had the ostomy surgery.
Because of her difficulty gaining weight, she had her ostomy bag for 12 weeks, and had the reversal surgery at almost 37 weeks gestation. Now, she's 5 1/2 and, other than her scar, there are no residual effects.
NEC can be scary, but it can also be taken care of with procedures other than surgery. Even if surgery is necessary, it's one doctors do a lot. Dealing with an ostomy bag can take some getting used to.
I'll be praying for you and your little one.