Text this: Thermodynamic stability from Lorentzian path integrals and codimension-two singularities