ESXi is just the platform to create/provision machines. ESXi itself does not have the ability to do such a thing.
You will have to bring in an external orchestration and automation engine which will keep track of the number of machines and then triggers machine creation if the number of present machines reaches a threshold.
Abhilash B
LinkedIn : https://www.linkedin.com/in/abhilashhb/