the prime minister is also required to delineate a "line of succession" every time he shuffles cabinet.
this is not constitutionally mandated, can change in any way the pmo wants, and is often not even published anywhere.
as mentioned: the party would pick an interm leader, and launch a leadership process.
but, if he loses confidence? then we have an election, and let the people decide.