The bizarre thing about delayed onset muscle soreness (DOMS) is that we still don't really know what causes it. Though people like to attribute it to lactic acid buildup, that's probably a misconception. As stated in the article:
Researchers who have examined lactate levels right after exercise found little correlation with the level of muscle soreness felt a few days later.
Referencing Nosaka's research published in this book, Wikipedia goes on to explain:
Two other hypotheses that have been advanced to explain the soreness,
muscle spasms and the presence of lactic acid in the muscle, are now
considered unlikely to be correct, since there is evidence to refute
Common sense would lead us to believe that the soreness is caused from tissue damage. I think that's probably the case, and I agree with the article when it says:
Though the precise cause of DOMS is still unknown, most research points to actual muscle cell damage and an elevated release of various metabolites into the tissue surrounding the muscle cells.
I suppose that it may possibly tie back to how muscles work in an anaerobic state, which we explored in one of your previous questions.
As for prevention, I'm sure we've all heard numerous remedies. Most of these have turned out to be false, including stretching and warming up. However, as described in this publication, gradually increasing the intensity may mitigate some of the soreness. Since you've been working your legs for over six months already, that might not be relevant.
In any case, if we act on the hypothesis that DOMS is caused by tissue damage (which I think we should), and if we can't reduce that damage by lowering our workout intensity, that leaves us with the option of doing what we can to speed recovery after the damage has occurred.
The answer involves knowing a bit about how the lymphatic system works in the body (in relation to tissue damage). Among other things, your body uses lymph to collect and flush damaged cells. The lymph is transported by one-way vessels throughout your body and eventually drains into the subclavian veins. The important thing to note is that lymph is not pumped like blood through a closed system, but rather "drains" with the aid of muscle contraction, gravity, etc.
So if the lymphatic system is how the body cleans up damaged tissues, and your DOMS are actually caused by tissue damage, recovering from your tissue damage means doing everything you can to help that system perform as well as it can. I'm sure this video, in which Kelly Starrett (KStarr) et. al. describe that very thing in detail has been posted here before. The old belief that rest, ice, compression, elevation (RICE) is the best way to treat this type of damage is wrong. As described in the video, rest and ice actually have a negative effect on lymph's ability to move around, so does anti-inflammatory medication.
The article that goes along with KStarr's video offers what I think is the best and most current treatment: movement, compression, elevation (MCE). Movement will keep the lymph pumping, short compression treatments (massage, compression bands, etc) will also help push lymph, and elevation will also aid in moving the lymph. Since I squat three times a week, personally I do full range bosu ball squats (as recommended by KStarr in this video) to clean up soreness and stiffness. If you think about the iterations of contraction and relaxation the muscles have to do to balance in this movement, it seems an ideal way to pump lymph.
Additionally, since lymph is "recycled" blood plasma (which is 90% water) staying hydrated is a good idea. As numerous resources I've linked have mentioned, making sure you're receiving proper nutrition and managing electrolytes will also help.
The linked resources offer a ton of information on the subject matter if you'd like to find out more. What seems to be the consensus is that the best way to treat your DOMS is probably movement, hydration, nutrition, electrolytes, compression treatments, and elevation.