The thing that controls how interfaces are auto-connected is a snap-declaration
assertion. The assertion is signed by the store - so if your snap does not exist in the store, you will not have an assertion and auto connection at snap install time will not work.
Clearly, snapd only trusts the store’s private key (snapd has the corresponding public key to verify assertions) so signing the assertion yourself is unfeasible as well.
One thing you could do if you are using a gadget snap, is to use that to set up connections at image build / first boot time, rather than at install time. Someone from the snapd team might be able to confirm, I think this might allow you to connect without needing the assertion.
Look at the “connections” section in the gadget snap specification here : Gadget snaps