The documentation states that updateFlow take an optional (I have no idea why it’s optional, doesn’t make sense) argument opts, which is an object that should have two parameters (“properties” is the correct term): id and flow.
Which means this should work:
Homey.flow.updateFlow({ id : flow.id, flow })
(where flow is short for flow: flow)
Since the method is async, you may run into performance issues if you have lots of flows that need to be enabled in the same loop. In that case, you can do this to update each flow sequentially (instead of in parallel, which your code is doing now):