TPS54231 input voltage sensitivity quite high?
The TPS54331 is rated at a max input voltage of 30 volts and you are connecting a nominally 24V DC supply and you say the TPS54331 is dying virtually straight away. 

Who can say what inductance is in series with the 24V DC output inside the power supply - can you see the internal circuits? I mention inductance because an inductor is pretty common inside power supplies both to reduce noise and reduce EMI.

So you connect the power supply and current flows through the 10 uF capacitor (C1) to charge it up. That current is flowing through the output inductor (speculation maybe) in the power supply and when the capacitor is fully charged to 24V there is still energy in that inductor which will carry on charging the capacitor to maybe twice 24 V (worst case) just like this: -



The above shows what can happen when 3V is applied to an LC circuit that has low damping (zeta is low). The red curve would be the resultant voltage across C1 - it is nearly double the input voltage. Now imagine what would happen when 24V is applied.

I'm not scare mongering - this has happened to me so I know it's possible.

Solution - put a 27V zener across the power terminals of the regulator.