The original law this is under to intentionally "shorten the life" in order to promote sales is going to have been written for a totally different case. i.e. intentionally having devices be disposable. Right?
If anything, Apple is the opposite. They consistently provide both security and feature updates for devices several years longer than the majority of competitors. You can see this from http://iossupportmatrix.com/ (there are other source) - the majority of the cases you have 5 years of iOS support - 4 years after the initial release. Most competitor devices barely update things after 2 years even for security let alone features.
The cynic in us might assume that's why the spent time intentionally making iOS 12 faster on older devices - I'd like to think they decided to do that anyway. But either way while that is a great, this ruling seems crazy to me.