Location of customizer Menu panel core code

The logic to dynamically add new sections is pretty straightforward with the JS API (and will be even more so in the upcoming 4.9 release).

For dynamically adding new nav menu sections, see the relevant logic in wp.customize.Menus.NewMenuControl.prototype.submit.

Another example you can refer to is in the Customize Posts plugin which adds sections dynamically for each post or page being edited. See wp.customize.Posts.addPostSection and then see the source for wp.customize.Posts.PostSection.

Lastly, see my previous answer for how to create a button control.