Hi,
As you mentioned in your description is really a unique setup, some of the settings are based on Moodle core, while others need modules and specific configurations and there are some parts that need to be handled programmaticly.
In all cases this should be done as per your request. I will need to make a study based on your request to ensure that every thing works out.
The result, a full working setup of your choice.
I think we need to discuss this further as the proposal here is very limited in character size.
Best regards,