I wonder if you could repurpose the mythflagcommercials process from MythTV to do this. It has a variety of methods to detect commercial breaks.
I haven’t used MythTV in years but I remember it being quite decent at commercial detection. Sometimes it missed the boundary between show and commercial by 1-2s, but otherwise was great.
(I bet they check for volume changes as one of the algorithms)
I suspect that other commercial skipping systems would have the same problem.