Right to repair should come in to fix this. My off the top of the head thoughts would be
* For a device like washing machine, parts should be supplied for a time of about 10 years.
* Every part should be available to purchase either on its own or as part of a replacement kit like a PCB.
* The sum of the cost of all replacement parts shouldn't be above x% of the initial item price.
* If an OEM physically can not get you a replacement part (Chip discontinued, etc) and your product breaks, the OEM pays you for the remaining expected lifetime. (If it was 5 years old they pay you 50% of the initial cost)
So in theory you should be able to build an entirely new product from parts and it would only cost you x% more than a pre built one which stops OEMs setting insane prices on replacements. The end result would likely be that OEMs would have to slim down on their product variations and sell the same designs for longer rather than releasing a new model of printer every year since this would make it much easier to stock parts. Some companies already do this, I have noticed Brevile has sold the same kettle and coffee machine models for almost 10 years now.