Feature summary: This is the commit I would like added. I'm not sure if these are the exact versions of the hooks that make the most sense, e.g. maybe the parameters should be reordered, or some other ones added, for more general use cases, but these are the ones I needed for my use case.
Use case(s): Currently it is very hard to sandbox Lua changes when there are cascading dependencies, e.g. Module:Team requires Module:ArgsUtil which requires Module:MapUtil which requires Module:TabeUtil. If you want to test a change to Module:TableUtil and see how it impacts this dependency chain, you have to create 4 sandbox pages. I would like to be able to create only a single sandbox page, Module:TableUtil/sandbox, and then write {{#invoke:Team|main|_branch=sandbox}} and then everything automatically is solved for me.
Benefits: If these hooks are added to Scribunto, I can publish my extension Lua Branches, which solves this use case. I also wrote a blog post about it.