If the baby is sleeping soundly and the poop in the diaper is not bothering them then you should not wake them up to change the baby.
That is unless you can smell the poop easily and it's making the room smell.
Then in that case I probably would wake the baby to change the poop diaper.
I've let my babies sleep in poop diapers before as it did not bother then and sometimes I never smelt it.
My babies were hard to get back to sleep once woken so I would make sure to add some diaper rash cream to their bottoms before putting a new diaper on them for bed.
If the baby pooped in the diaper during the night then I would let them sleep unless they would wake me up and cry wanting the diaper changed.
It's not gonna harm the baby to sleep through the night in a poop diaper.
But if the baby is crying and it's bothering them then you should change the poop diaper to keep them comfortable.