Is there any way to write a code that it auto punches geotrace question in Survey123 form every certain period of time?
Survey123 does not yet support location 'streaming'. You currently need to manually capture GPS locations as you move in the field. This is something we are interested in implementing in a future release. I encourage you to submit an enhancement request via https://support.esri.com. Your request can then be attached to the previous request for this functionality. This helps us assess demand for the enhancement and prioritize it accordingly.
I know it's officially not supported yet, I was hoping someone found a workaround. I am sure a lot of companies will appreciate this streaming functionality, and I will submit the enhancement.