I had this happen once, i feel paranoid about going again because i'm afraid i'd re-open the wound or cause it to become infected somehow

But yeah, get more fibers and vitamins in you, and poop more often if you have to, don't hold it in or whatever, if you have to go, just do it, don't let it pile up and form a cluster