I don't think this should be regulated at all. Apple should be able to impose their rules in their systems. Let's be clear about this, if people are choosing to buy these black-box closed handheld computing devices, there are consequences that come with that choice.
Apple is more than welcome to put whatever rules they want on their systems. My phone is not their system though, it’s mine! If I want to run tmux/fetchmail/ocamlc on it then it’s my problem not theirs!
I am not defending closed platforms, but technically, you are free to jailbreak your phone, they're just not obligated to provide any support after that, right?
https://en.wikipedia.org/wiki/IOS_jailbreaking#Legality
If Apple provided a way to jailbreak their devices, I'd be more inclined to support this argument. But they try to prevent jailbreaking at every opportunity so, regardless of the legality of it, Apple does not consider the phone your system, they consider it theirs.
They mostly prevent jail breaking because the same processes that jailbreak a phone can often be used to hack peoples phones because they’re security loopholes.