In a finite semigroups every element has a unique idempotent power, just take $s^{n!}$ where $n = |S|, s \in S$.
In an infinite semigroup there are clearly elements without idempotents, just take $(\mathbb N, +)$ for example.
In an arbitrary semigroup if $s \in S$ has an idempotent power, i.e. there exists an $n$ such that $s^{n}$ is idempotent, is it unique? And further if it is unique, I can denote by $s^{\omega}$ the unique idempotent of $s$, then if $st$ and $ts$ has such an unique idempotent, does $(st)^{\omega} s = s(ts)^{\omega}$? (in the finite case this is all satisfied with $\omega := n!$).
If an element $s$ of a semigroup $S$ has an idempotent power, then the subsemigroup generated by $s$ is finite and it contains a unique idempotent.
If both $st$ and $ts$ have an idempotent power, say $(st)^p = (st)^\omega$ and $(ts)^q = (ts)^\omega$, then $$ (st)^{pq} = \bigl((st)^\omega\bigr)^q = (st)^\omega \text{ and } (ts)^{pq} = \bigl((ts)^\omega \bigr)^p = (ts)^\omega. $$ Therefore $(st)^\omega s = (st)^{pq}s= s(ts)^{pq} = s(ts)^\omega$.