The example is of course egregious ($600 for a software update for a wire that got wet, basically). I fully support being able to repair your own stuff but I have no idea how you regulate this so companies don't gouge "owners" for aftermarket services. Earlier today there was a thread about e-bike battery prices (tl'dr they're ridiculous expensive). I really wish rechargeable batteries had interchangeable form factor…
Apple can make the customer whole and then go sue the 3rd party manufacturer. Apple has far more resources and clout to hold manufacturers accountable than any one customer. “Don’t make crappy parts or Apple will send a team of lawyers to bankrupt you” would be a credible threat.
If this is a counterfeit Apple charger, then yes. If this is a charger that was purchased from Apple as the distributor, then yes.
However, if this was a 3rd party charger purchased from a street vendor or online merchant (that has difficulties with counterfeit products) that could be used for anything from the cat water fountain pump to an Apple iPhone - then no.