Whatever opinions the retailer likes to hold about whether or not this freehub is consumable, a consumable item is usually considered as something that will
A: wear out in normal use over a period, and
B: in the case of a bicycle rather than a spaceship, be replaced easily without special tools by the end-user
The position here is that a crucial component:
1: has broken, as distinct from worn out
2: failed well within 12 months
3: cannot reasonably or easily be replaced by the user
4: seems unobtainable through authorized suppliers (against European rules on availability of parts).
If it were me I would not be toying with turgid admindroids in the courts or trading standards. I would be writing a polite, succinct and non-threatening email to the CEO of whichever of Mahle's many UK arms deals with ebikes as opposed to automobile or other engineering systems. This is a reputable multi-billion pound/euro company. Find out which subsidiary deals with ebikes, eg Mahle Industries. Mahle Powertrain, Mahle Aftermarket etc.
My experience of writing emails to CEOs of various companies on four separate problems in the last few years has been excellent. A response comes within 24h, not of course from the CEO, but someone sensible and intelligent who can see the picture clearly and - vitally - has the authority to tell someone to fix the matter quickly. It's a magical experience.
You can get the name of the CEO and the direct email from a very useful website
https://www.ceoemail.com/. (Sorry. I can't get the hyperlink here to work).
Good luck..and let us know
PS, edited a bit later. I've just looked at the Mahle Aftermarket website out of interest. In their Customer Portal consumables are listed as such things as fuses, nuts, screws, washers and so on. Important specific components are things like electric motors.... Phone Mahle first to check which part of Mahle deals with ebike motors, then you will know exactly where to send the email. Even if the ebike motor subsidiary is based in Stuttgart rather than UK you will still get a good response...maybe better!
PPS Mahle SmartBike Systems have a UK support team who may be a good place to start with a phone call.
https://mahle-smartbike.com/contact/
If they are not helpful that's even more useful stuff to include with your CEO email.