Can a synthetic thread act as an electrochemically switchable molecular device?