This won't hold up in the USA.
iPhone Dev Team came out with the first jailbreak. I used it to install games on my 1st gen iPod touch. There was zero piracy. There was no app store, nor public plans to one day have an app store, there was only native features and web apps.
Their initial efforts were in large part why jailbreaking was granted a DMCA anti-circumvention exemption.
If you read the article the court found almost 300 non pirated games created for Jailbroke Nintendo switches.
Allowing side loading while checking adding anti-piracy fingerprint checks in the firmware you will get rid of 95% of the resources developed toward circumvention.
Or you can try to make proxies, VPN and github banned as well. Good luck with that.