My question is if something like this is possible.
No. The “prototypes” that you set on collection proxies, factories, and collection factories are all static, they can’t be changed at runtime. Think of them like preloaded placeholders for specific Game Object or Collection files.
What use case do you want this for?
Switching between levels without having multiply proxies
So there is no way to load different collections without having multiply proxies?
That is correct. Collection proxies are not expensive or anything like that. Are you concerned about something related to proxies?
I just read somewhere that there was a limit of 8 proxies pr collection
The limit can be changed in the project settings, but do know that when you load a collection via proxy you create a new game world, physics world included. So there is a memory penalty to each world you keep in memory at the same time. The default world count is 4 for this reason but if you really need to you can change that too in the settings. See https://www.defold.com/manuals/project-settings/
Note that the “World count” is for currently loaded collections.
In a collection itself you may have 100 proxies, one for each level. But you can only have a few loaded at the same time.