The error 0x800706BE is apparently quite commonly used by the WMI framework, if you look at the various reports on the Internet. Unfortunately, the event logs are also unusable.
In my case, the cause was ultimately quite simple. When restructuring the sample code in https://learn.microsoft.com/en-us/windows/win32/wmisdk/supplying-data-to-wmi-by-writing-a-provider, I had built in an error: The method DllGetClassObject deleted the factory after its use even if QueryInterface was successful. As a result, the CreateInstance method could of course never be called.