I'd be fine with charge-only cables if there was a distinctive, mandatory, universally-honored way of indicating that.
I deliberately carry charge-only cables when I anticipate encountering untrusted chargers, and I've designated all mine with a band of red heatshrink on both ends.
For Type A chargers they are readily available online and can be testing using the approach mikepurvis wrote in a comment parallel to this. Or you can make yourself a clunky one as it’s just two wires.
I have seen them called “data blocker” or “secure charging cable” but what you want is one that is a female-to-male device so you can attach it to charging cables not just bricks.
Type C is harder. I have one from the early days of Type C that doesn’t do PD so in the end it’s only useful for phones. I haven’t seen one that does Power Delivery.