Requiring that someone cannot use Google branding on a phone with an ancient version of Android is legal.
Requiring that someone cannot use Google branding on any device they manufacture or sell, if they also manufacture or sell devices without Google branding that use ancient versions of Android, is entirely illegal in the EU.