This is all correct in principle, but in practice it's a lot messier

It doesn't have to be messy. A lot of the messiness is self inflicted by contractors who are desperate for work and would be better of just getting a regular employee job instead.

I can imagine the type of work you do heavily influences the chance of begin paid during/before work finishes too…