Implantable electronics for the recovery of neuromuscular functions