Chiming in to agree that your pooch needs to see the Vet. My old girl developed fecal incontinence. It was pretty easy to handle, literally, just pick them up and put them outside, no need for panties. Unless your boy is urinary incontinent as well? Or his stools are loose?
With our girl her problem was Invertebral Disk Disease and Significant Spinal Spondylosis. We found out (X-ray) when she was 12 and a half and she lived to 14 and a half. If your boy has something like this you need to know so you can handle him properly. Not knowing, you could inadvertently do something to make him worse. Please see your Vet.