Is there any danger to my devices in testing possibly-bad cables?
Yes - lightning carries decent amount of power. Crossed wires could short out a device. MagSafe - worse - more power, less room for error. The only upside there is the MagSafe in side of things is a bit more robust since it handles more power and if you blow the MagSafe on the Mac, it's a relatively inexpensive repair.

Fixing the phone connector would be far more costly.

That being said, the change of damage is low and if you have lots of cables and can make money on them, the risk might be worth it even if you damage things and have repair bills.