So, generally speaking, we don't offer any mechanisms for this.
The closest we have is the ability to add and remove modules, which can include an ordering property. Theoretically, you could remove all modules and then add them back in the order that you want.
I think the intention is that the checkout module configurations that we include out of the box are designed to be static. Site owners have the ability to choose which configuration they want to use and so the idea is that we have provided a few out of the box. Developers, therefore, perhaps shouldn't change those. But that isn't a rule.
In other words, there really isn't a way to do what you want to do. I think you can either do:
1. Your idea of using JavaScript to pass in an array of a new order of steps (I've not tried this, so I have no idea if it's a good idea)
2. Use addModule and removeModule to add/remove modules to an existing step configuration
3. Create your own step configuration
If you're using SCA then simply copying an existing steps configuration file and changing it how you want would work. Option 3 is probably the best out of the three imo.