To find the powers, you must iterate, but there are efficient ways of doing it.
For starters, each time you find a prime factor $p$, factor it out of $n$ before looking for new factors. For your example:
$$567788=2*283894=2*2*141947$$
We factor $2$ out until it doesn't come out anymore, then look for the next factor. 3,5,7,11 are not factors, 13 is, so
$$=2*2*13*10919$$
13 does not divide again, keep trying factors until finding 61 works
$$=2*2*13*61*179$$
We know that 179 is prime without having to try any other prime factors because we already know it cannot be divisible by anything less than the last prime factor we found (61) which is more than $\sqrt{179}$. Notice we did not need to try dividing by any number larger than 61, which is a good deal less than $\sqrt{567788}\approx750$.
There are certainly other ways of doing this but this is both simple to understand and implement and saves you a lot of computation from your previous method.
I came up with an algorithm, decades ago. Kap was interested in solving $\sigma(x^3) = y^2,$ where the next simplifying hypothesis was that $x$ would be squarefree. He referred to these problems with the name Ozanam, from somewhere in Dickson's History.
The reason something can be done is that it is possible to regard odd/even exponents as numbers $0,1$ and perform row reductions using Gauss methods in the field with two elements.
So, take the primes up to $100,$ say. Each prime gets a column in a certain matrix. For each prime, factor (in my case ) $\sigma(p^3),$ and assign a row for every prime that comes up in at least one of these factorizations.
The column for prime $p$ gets mostly $0$ entries, but gets a $1$ at every prime factor of $\sigma(p^3)$ that occurs to an odd power.
An answer to the original problem is a vector in the nullspace of this matrix, that is a vector consisting of either $0$ or $1$ that is sent to all $0$ over the field with two elements. This is, simply, a choice of the prime factors of a (squarefree) solution.
None of this was easy, but the program was lightning fast.
One could customize this for $\sigma(x)$ = y^2 by dropping the $x^3$ aspect, instead, for a few primes of interest, replace the column for $p$ by the column for the preferred $p^a.$ I did some of that at the time. It is less elegant, there are some nice features to keeping homogeneity of exponents.
Best Answer
First factor $12$ to figure out what the $k_i$ should be.
As $12 = 2^2 \times 3$, we could have
$$12 = 6\times 2 = 4\times 3 = 3\times 2\times 2$$
so there are four cases to check (for $k_1 \ge k_2 \ge k_3$):
Case 1: $k_1= 11$.
Case 2: $k_1 = 5, k_2 = 1$.
Case 3: $k_1 = 3, k_2 = 2$.
Case 4: $k_1 = 2, k_2=k_3=1$.
To keep $n$ small, we choose $p_1 < p_2 < p_3$. Hence $p_1=2, p_2 = 3, p_3= 5$ should give the minimum in each case. Now compare the values of $n = p_1^{k_1}p_2^{k_2}p_3^{k_3}$ to verify that $60$ is indeed the smallest such $n$.