I've to read all the RestarManager documentation and get into this to catch what you are trying to do.
And you are right. This is a elegant solution to a lot of problems.
BUT, you have two problems.
First, from the Guidelines for applications in Restart Manager, the behaviour observed in word has to be coded in application. Applications need to be aware of the Restart Manager and know how to act. But well, maybe your applications handle it, but ...
Second is Microsoft does not provide a COM interface to the API. From the documentation: The Restart Manager DLL exports a public C interface that can be loaded by standard or custom installer
.
So, a wrapper needs to be written.
Anyway, for a "scripting" workaround, InnoSetup pascal scripting lets you make use of the Restart Manager API.