You're right about the self-replicating part, that's probably very far away (and not necessary for this). But I think self-assembling nano-mechanisms are closer. We can already sort of do it with self-assembling dna mechanisms and, theoretically, those can bootstrap into more complex tech made out of better materials