I always figured that they switched to something by the fourth season of DS9, because the picture quality got so much better from then on compared to the first three seasons. Stuff like rainbow artifacts were no longer common. Same with VOY looking better by the second season after the first.
I wouldn't be surprised if at some point both DS9 and Voyager switched to Digital Betacam, since it offered picture quality that was equal to or better than D1, but at a price that was a whole lot cheaper than D1.
That being said, there may still be some shots in the later seasons that contained the composite artifacts due to reuse of existing shots on tape (even if they digitally copies the shots from D2 to Digital Betacam digitally, since they would be going from a composite source to a component source), or even the opening. Sure the opening had a few shots changed with the Defiant, but a number of shots remained throughout all 7 seasons (such as the comet cloud, or the shot looking up at the lower core). I should get out Trials 'N' Tribble-ations
to on the TOS Season 2 Blu-Ray and see if I spot any composite artifacts on that up-ressed version (at 25:20 there is a wall decoration that, as the camera moves with Bashir, the decoration starts to pulse with black lines---the decoration's a shiny silver thing that reflects the different color lights, but the black pulses appear to be from a composite issue, plus there was rain bowing in the opening credits when we see the Defiant pulling away from the pylon --- I'd say DS9 was definitely still using D2 in season 5).
As for TNG, in "All Good Things", after the collapse of the anomaly, we go to Q's courtroom, and star with a high shot over Picard. It you take a look at the grate underneath Picard, on all the broadcasts and DVD's of the episode I've seen (even upressed to 1080p) that grate always rainbows. I realize even with SD component the light might be causing issues, but I think it might be a definite clue that TNG was still being edited in the composite realm at the time.