In broad generality we can solve the discrete logarithm $nG=R$ problem for a point of order $m$ by solving for $n\pmod q$ for every prime power that divides $m$ and combining them with the Chinese remainder theorem.
Generically we can solve the component discrete logarithm problem modulo $q=p^t$ with $O(tp^{1/2})$ work using methods such as Pollard's kangaroo.
However for especially badly chosen primes where one of the primes dividing $n$ divides the underlying field characteristics (so that the Smart/Semaev anomalous curve attack applies), or where there is a small embedding degree for that prime (so that the MOV attack applies), the value $n\pmod q$ can be recovered in work sub exponential in $p$. This applies whether $q=n$ or whether there is a cofactor.
The small embedding degree would always make this component of the discrete logarithm very easy to recover so that the hardness of the overall discrete logarithm is dependent on the other primes. At this point one might as well simply work outside the subgroup generated by the prime power with small embedding degree.
The choice to use a generator of prime order is one of efficiency. For, say, 128-bits of security while not leaking any information about $n$, we would want every prime factor of the order of the generator to be 256-bits in size and neither anomalous nor of low embedding degree. We could do this with a case where the order of the generator is the product of two 256-bit primes, but then we would need an underlying field of at least 512-bits and be passing around similarly sized coordinates as public keys. By only using one prime we can work with the smallest possible underlying field while having the appropriate level of security.