The only thing is - "Is it possible to stop the creation of this Guest accounts.". we don't want to maintain such record in our DB. So is there any way to disable such mechanism.
They wouldn't be called scheduled tasks if it wasn't possible to schedule them.
In Admin > System > Schedule Tasks -> Delete guests
you can edit the interval in seconds by click on Edit on grid and update the time interval to delete the guest.
Don't forget to restart the site after update schedule task otherwise it will not take latest effect
you have to create system customer like builtin guest customer and instead of creating new guest customer you have to assign that built in customer to _workcontext.currentcustomer
I have done a while ago so i don't remember the exact code but i remember above concept i have used that time.