This can be easily done as early as level 3, and this level, or level 4 is when it should be done as it gets progressively harder the further waves you enter. Basically, you just need to sit back at the start of the lane and summon allies whenever you have enough upgrade power. Focus on just summoning farmers, which cost 5 energy, and swordsman which cost 10 energy.
The reason level 3 is the earliest this will happen is because level 1 you are by yourself, and level 2 is when they teach you how to use/summon allies, and for some reason, even if only your allies kill the enemies in this wave it will not unlock.
It is worth noting that this needs to be done on a regular level, not a bonus level.