In addition to George_Johnson's answer, the closest would be looping through the fields, reading out their properties, deleting them, recreating the fields in the "correct"order while reapplying the properties.
The best that can be done is to use
which only allows "rows", "columns", and "structure".
I would make sure that you turn off the "Preferences => Forms => "General" => "Adjust tab order when modifying fields". Or every time you edit the form the tab order will change.
Thanks for all the feedback
I'll try the setPageTabOrder