I would like there to be a process similar to disabling System Integrity Protection on macOS, which requires booting into recovery mode. From there you can gain kernel access and inspect whatever processes you want.
It won't happen, and I consider it a major problem with iOS.
I think there's more that could be done to make the process unappealing. What if the setting erased all data on the phone, a la unlocking the bootloader on Android? What if there was a one-week time delay before the setting took effect? What if you had to visit an Apple Store?
(I don't like that last option, because it makes research inaccessible to e.g. people in countries without Apple Stores. But it would be better than what we have now.)
The biggest concern I'd have with this would be that it would almost certainly be abused to install undetectable surveillance software on devices, e.g. by a partner in an abusive relationship, or by overbearing parents on a child's device.
Is it perfect? No, but everything in life is a tradeoff. And not being able to study our own devices is a big problem too.