Nothing is going to definitively give you a list of dead case statements. If it says it can there is either no possibility of another value (finite code branching) or it's lying. So unless you know every possible value that can be passed to execute_case
, you'll be in the dark. (And I assume you don't given the question).
What you can do is place a small logger in that code that outputs/records the values being passed to that switch. Then, over [a good amount of] time and/or several thousand executions, track which ones are being hit and which ones aren't. I wouldn't necessarily remove ones not being hit, but maybe try deprecating them and wait for a longer duration/more executions until you reach the conclusion it's no longer necessary.