Yes and no.
It's not really the numbers or length of time per say. It's all about the genetics. It's about selectively breeding for those wanted traits and selecting against unwanted traits. But to select for those traits, it could take several generations or as little as one.
I could breed 10, 20, 30 generations of aggressive rats and still get aggressive rats no matter how often I socialize them.
Temperament is heritable.
Genetics is the key. Breeding those with good/friendly/balanced temperament will often produce offspring with those traits and vice versa with those animals with poor temperament.
Norway rats have been selected for positive temperament for years. People(or at least those in the reptile community) have only started to select for ASF temperament recently. But there are still a ton of aggressive colonies being produced and bred because some keepers don't really care since they're feeders.