The miner needs to withdraw the rewards every N transactions and call the powerup when it's out of CPU.
Ideally, it should powerup gradually whenever there's a transaction failure because of insufficient resource, buy the resource from powerup, and retry the transaction.