Do people design the shape of the Higgs potential so that it always breaks down the gauge group in a certain way?
Yes they do. I'll review the Georgi-Glashow breaking of 12 generators of SU(5) to SU(3)×SU(2)×U(1); point out the discriminant parameter in the Higgs potential that dictates breaking only 8 generators to SU(4)×U(1) instead; and justify the "how/why" by a summary "seat of the pants" argument (the Fermi/Feynman style), leaving you to replicate the epic Ling-Fong Li analysis for this particular group.
But I 'll desist from bogus cosmological scenario speculation, and how the flip of that parameter of the potential I'll discuss upends the hypothetical SU(5) breaking into a freak universe.
The classic renormalizable and field-parity-symmetric quartic potential for
the adjoint (24) Higgs $\Phi=\phi^a \lambda^a/\sqrt{2}$ is
$$
V(\Phi)= -\frac{\mu^2}{2}\operatorname{Tr} \Phi^2 + \frac{a}{4}(\operatorname{Tr} \Phi^2)^2 + \frac{b}{2}\operatorname{Tr} \Phi^4 .
$$
This looks just like the Higgs potential of the SM, except, crucially, for the extra quartic term with coefficient b. (For SU(2), such a term would be proportional to the a term, since the symmetric d coefficient of SU(2) vanishes, so the trace collapses to a square of traces: can check this with Pauli matrices. Not so for any other SU(N).)
It is a fact, then, justified below, that, for b>0 and 15 a +7 b>0 the adjoint Higgs vev at the minimum is the one proportional to the SM hypercharge (think action on the 5), and traceless (identifiable with a generator of SU(5)),
$$
\langle \Phi\rangle= v \begin{pmatrix} 1&0 &0 &0 &0\\
0&1 &0 &0 &0 \\0& 0&1 &0 &0 \\0 &0 &0 &-3/2 &0 \\ 0&0 &0 &0 &-3/2 \end{pmatrix},
$$
and thus symmetric under SU(3)×SU(2)×U(1).
Plugging it into the potential yields
$$
V(\langle\Phi\rangle)= -\frac{\mu^2}{2} v^2 \frac{15}{2} + \frac{ a}{ 4} v^4 \left (\frac{15}{2}\right )^2 + \frac{ b}{2} v^4 \frac{105}{8} .
$$
Solution of the full problem specifies that this is minimized for the $v^2$ whose variation yields zero,
$$
{\partial V \over \partial v^2 } =0 = -\frac{\mu^2}{2} \frac{15}{2} + \frac{ a}{ 2} v^2 \left (\frac{15}{2}\right )^2 + \frac{ b}{2} v^2 \frac{105}{4} \leadsto \\
\mu^2 = v^2 (15a+7b)/2 ~ > 0.
$$
The positivity of the parenthesis ensures the quartic term is increasing without a bound for large v.
Now you are effectively asking: "What conditions lead you, instead, to a traceless vev,
$$
\langle \Phi\rangle= v \begin{pmatrix} 1&0 &0 &0 &0\\
0&1 &0 &0 &0 \\0& 0&1 &0 &0 \\0 &0 &0 &1 &0 \\ 0&0 &0 &0 &-4 \end{pmatrix},
$$
symmetric under SU(4)×U(1) ?"
The answer is b<0 , for positive a, see below. Now
$$
V(\langle\Phi\rangle)/10= -\mu^2 v^2 + 10 a v^4 + 13 b v^4 ,
$$
and variation yields the minimum value
$$
\mu^2 = v^2 (20a+26b),
$$
which yields the new condition 10a+13b>0. So a> -1.2b> 0.
Is it possible to appreciate this bifurcation summarily? Consider this interpolating traceless vev,
$$
\langle \Phi\rangle= v \begin{pmatrix} 1&0 &0 &0 &0\\
0&1 &0 &0 &0 \\0& 0&1 &0 &0 \\0 &0 &0 &1-x &0 \\ 0&0 &0 &0 &-4+x \end{pmatrix},
$$
that is, we've reinserted a new d.o.f. parameter x, which yields the first v.e.v. for x=5/2 and the second one for x=0, respectively.
Can we see how the sign of b prejudices the respective values?
$$
V(\langle\Phi\rangle)= \\ = -\frac{\mu^2}{2} v^2 ( 3+ (x-1)^2 + (x-4)^2 ) + \frac{ a}{ 4} v^4 ( 3+ (x-1)^2 + (x-4)^2)^2 + \frac{ b}{2} v^4 (3+ (x-1)^4+(x-4)^4 ) \\
= -\frac{\mu^4}{4a} + a v^4 \left ( x(x-5/2)+10 -\frac{\mu^2}{2av^2}\right )^2 + b v^4 130 (1-x+O(x^2)) \\
=-\frac{\mu^4}{4a}+av^4 \left ( x(x-5/2)+10 -\frac{\mu^2}{2av^2}\right )^2+b v^4 ( 105/16+ 27(x-5/2)^2/2+(x-5/2)^4 ).
$$
You then see that for b=0, the "conventional" potential terms cannot distinguish between the two values of x, and has a minimum for either value.
Moreover, a negative b favors the x=0 value, since increasing x from it increases V (penultimate line). Likewise, for positive b, any excursion from 5/2 increases V, whose minimum is under investigation. You can be guided by this principle as you do the full minimization for the full 24-tuplet, as in Ling-Fong Li's 1974 paper.