Implantable devices with mechanical intelligent implantable devices for heart failure therapy