We assume correct FIPS 186-5 enhanced Miller-Rabin test. We stick to the question's use of $n$ and $k$ for w and iterations.
When passed a composite odd prime power $n=p^q$, the output is either PROVABLY COMPOSITE WITH FACTOR (most often) or PROBABLY PRIME (vanishingly rarely); never PROVABLY COMPOSITE AND NOT A POWER OF A PRIME. Hence the probability in the second paragraph of the question (v5) is $1$, regardless of how prime $p$ and $q>1$ are chosen.
PROBABLY PRIME is returned for a composite odd prime power $n=p^2$ if for all the $k$ base(s) $b$ selected at step 4.1 it holds $b^{\,p-1}\bmod p^2=1\,$. That is: $p$ is a Wieferich prime to base $b$. This is rare, as apparent in Table 1 of Amir Akbary and Sahar Siavashi's The largest known Wieferich numbers (Integers 18, 2018). Their record Wieferich prime is $p=9809862296159$. The $b=22^j$ for $1\le j\le19$ are among suitable bases. The probability of getting PROBABLY PRIME for the corresponding 87-bit composite $n$ is thus $>2^{-82.1\,k}$. I fail to exhibit a larger composite $n$ that's a power of a prime and base $b$ with outcome PROBABLY PRIME.
Based on earlier exchanges with the OP, the question's context is implementing a plausibility test of RSA public moduli per NIST's SP 800-89 5.3.3 by the example method given, specifically step e (corrected) which suggests "obtaining an output of COMPOSITE AND NOT A POWER OF A PRIME using the enhanced MR primality test".
The OP wants good assurance that their plausibility test won't reject RSA moduli $n$ that match all the stated acceptance criteria, even when such $n$ is one they specifically crafted for testing purposes as a composite not a power of a prime with it's smallest prime factor larger than $\ell=751$, but still small enough that the enhanced MR test sometime returns PROVABLY COMPOSITE WITH FACTOR (rather than PROVABLY COMPOSITE AND NOT A POWER OF A PRIME as it essentially always does for $n$ generated for the purpose of being a safe RSA modulus).
In my opinion it's best to reject any $n$ which is observed making the enhanced MR test return PROVABLY COMPOSITE WITH FACTOR. That can only improve security. That will only perceptibly lower availability of a deployed system when and if it's attempted to load it with $n$ grossly insecure as an RSA modulus (indirect proof: if the enhanced MR test, which is well known, had sizable probability to pull out a factor of RSA moduli intended to be secure, that would be a blow to RSA's security and RSA wouldn't be used). And then it's desirable to be unavailable rather than insecure. That won't prevent getting rubber-stamped by actual security authorities.
Further, @poncho remarks [update: with proof] that if $n$ is a Carmichael number then the extended MR test never ends in PROVABLY COMPOSITE AND NOT A POWER OF A PRIME. Rather it ends either in PROVABLY COMPOSITE WITH FACTOR (most often) or in PROBABLY PRIME (with a probability somewhat below $2^{-2\,k}$).
And it's possible to generate large Carmichael numbers of bit size in the order of a few thousands bits as used for RSA moduli: $n=(6u+1)(12u+1)(18u+1)$ having its 3 obvious factors prime is a Carmichael number. Such $n$ matches no explicit criteria requiring rejection per SP 800-89 5.3.3. Yet such $n$ is trivial to factor using $u=\lfloor(n/1296)^{1/3}\rfloor$, which is reason enough to reject it. And we have no other choice if we want the plausibility test to only directly use the outcome of the extended MR test to prove that a candidate $n$ is a composite not a power of a prime (the only method suggested in SP 800-89 5.3.3), and terminate for any $n$ a tester can feed it.
In conclusion: I recommend to perform test e of SP 800-89 5.3.3 as a single extended MR test, and reject $n$ if the outcome is other than PROVABLY COMPOSITE AND NOT A POWER OF A PRIME. We can use $k=5$ for any $n$ at least 1024-bit. This simplifies, and allows to perform the tests in the order stated. It rejects some $n$ that it's not mandated to reject, but that's justified.