This is tiresome. They cannot lock down the Mac without losing one of its biggest markets, software development. It was mentioned at a WWDC 5 or 6 years ago I think that software developers were the largest of the professional groups using Macs. You can’t have a development environment that doesn’t allow for the downloading, writing, and installation of arbitrary code.
As long as Apple wants people to develop software for its platforms and/or sell to web developers, Android developers, scientific computing, etc. they will not lock down the Mac.
I don't buy that for one second. If they cared for software developers they would have never moved the ESC key into the touchbar back when that was a thing.
Also if they really cared, they would operate/manage brew and integrate it better than have people spend their free time to make apple's products more usable for software developers.
As long as Apple wants people to develop software for its platforms and/or sell to web developers, Android developers, scientific computing, etc. they will not lock down the Mac.