Critical points and phase transitions in 5d compactifications of M-theory