It sounds like you want a phone version of Raspberry Pi, something that's totally open to tinkering? That would be cool to see, but it would be a tough sell to general users.

Sort of. Maybe not at GPIO level, but come on - the phones are loaded with sensors that mostly cannot be accessed directly, APIs increasingly expose them as logical indicators of system state, hardcoding a use case and throwing 99% of the signal, and the app building process is designed to create a hard separation between "user" who is a consumer of apps, and "developer" who is building apps to sell to users. The middle ground is hollowed out entirely. And even at the OS level, 90% of the phone data - including especially data stored by apps - is purposefully made inaccessible to user.

I'd like a device where I can, to use a random example, trivially wire up so all messages are collected to shared database I can search, and voice messages are directed to a local or remote transcription endpoint. Or even simpler, I want a phone where I can screenshot the list of transactions in my bank app. Right now this is near-impossible, because by the time I defeat enough of "security" measures to access the data, the phone stops passing attestation checks and some of the apps in question won't load anymore.