Ah, because of that diode sugestion of no need to switch cables, that will not work..... I could not understand the link of your rermark with this topic.
Well if you want to go advanced I sugest to use a hall current sensor that works in both ways (they are very cheap to find). Then you can make a detector in which way the current flows that controls a relay that will switch the resistor.
https://nl.aliexpress.com/item/32995196340.html