You can't have that level of safety with API. Nothing prevents a dev from building an API that returns always "200 OK" when being called for a "terminate subscription" action, but that does nothing under the hood. If I unsubscribe from an Apple provided UI, I will hold Apple responsible for the execution of the action. Apple works really really hard to make sure that this trust we have in their system is warranted. As we know, trust is hard-earned, easily lost, and difficult to reestablish. So all it takes is a single bad experience to make me doubt everything else.
The current system allows Apple to control 100% of the process and to be fully responsible for everything.
That being said, Apple should allow users to perform all these operations outside of the iOS ecosystem if the developer allows it. I feel there is a clear communication here that "anything done outside of the Apple UI's is not the responsibility of Apple" (including payment / subscription management).