The cables are supposed to be labelled with their maximum speed (5, 10, 20, 40, or 80 Gbps or nothing if no data) and maximum wattage (60W or 240W).
HOWEVER, I don't remember ever seeing a cable with such a label. I'm sure they exist, but I don't see them. Requiring products to be labelled, and treating mislabelling as fraud, could mostly solve this. It's definitely a real problem.