Well, Apple could just... let people install other stores. The App Store will still exist for new users and security-paranoid users, but the right to install/manage software needs to be a universal right when you buy hardware from someone. Arguing the opposite is almost insanity.
> I’m a relatively technical user, but I have no idea how I would determine if the software was safe.
Do what F-Droid does, compare the downloaded binary against a first-party checksum for the release (usually provided by Github). Then you can tell if the software you're loading has been tampered before it runs, simple as that. This is what the App Store does internally (along with cert-checking) to provide your "premium" security experience. It's largely designed to be distributed.
> Conversely, it would be interesting if an independent pro-privacy company (such as DuckDuckGo?) were to make a configurable smartphone for the more technical crowd that was both secure and allowed side-loading.
That's not the point either. The iPhone is fully capable of loading alternative App Stores and even alternate OSes. Apple is the only one stopping the user from doing these things. The fact that Apple explicitly does not allow people to distribute software unless they profit off has drawn incredible antitrust scrutiny. All of this can and will be alleviated with Apple giving up their iron grip on the 30% tax. What alternative do we have?