1 - Is there any plans to automatize the module.xml generation by using something like a Wizard?

Submit an issue?  More over, craft a module which supports that! And PR - it's a Community Package manager.

3 - Is it possible to run pre/post-install scripts as well? Kind of what installer classes do.

I think, this already in place. @Dmitry Maslennikov who contributed a lot will comment.

4 - Is also possible to use the module.xmlto provide a contextual root?

We maybe can use the code! Thanks! @Dmitry Maslennikov ?

As I see in your code you already do some "error handling". So you can continue:

Change your code

Do objExternalUser.%Save()

to the following:

set stat=objExternalUser.%Save()

if $$$ISERR(stat) {

 #; error handling

 d $System.OBJ.DisplayError(stat)

}

HTH.

Out of curiosity - you have empty Try-Catch block. Why don't use it?

you could embrace your code into the following:

$$$TOE(objExternalUser.%Save())

And catch your error with status in catch then.