Looking at the circuit diagram for the 2006 CRD it looks like the alternator is the same as the previous models....it does
not have a built-in regulator but gets its field coil pulses from the ECM as usual.
The Black wire on the small connector goes to ground at G111 via connector C108...there could be a bad connection in the C108 connector or the ground point itself at G111 might be bad. You could try splice in another ground from a good clean chassis point into the Black lead right near the small connector that plugs onto the alternator. You can never have too many grounds so it is worth trying this as a temporary measure.
The Brown/Dark Green wire from the small connector goes to the BCM Connector C1 pin 18 via connectors C114 and C120..you may have a bad connection here somewhere as well. The connector locations are shown in the Circuit Diagrams.
If you do not have the circuit diagrams they are part of the 2006 KJ Service Manuals...you can find the link in SAM's Noob Guide.
I personally would cut he Brown/Dark Green wire near the small connector and also cut this wire at the BCM connector C1 pin 18...in case this wire is fraying to chassis somewhere. The I would replace this disconnected wire with a temporary wire going straight from the small plug on the alternator straight to Pin 18 on connector C1 at the BCM...bypassing the connectors C114 and C120 altogether. This may sound a bit drastic but it is easy to solder the wires back in place and insulate the joins with shrink tubing. I had to do this several times to repair 6 faulty wires on my 2002 CRD!
I believe on the 2006 CRD the field coil on the alternator is activated via the BCM only when the RPM goes above 2,000 RPM at which stage the Pulsed Width Modulation pulses are applied to the field coil to increase/decrease the charging rate....this may be why there is a difference between low idle....no problem...and high idle...problem.
All of these controls and sensing of the status of the Headlight switch etc. are done inside the BCM...this is shown as a "Black Box" in the circuit diagrams so it is impossible to see what goes on in there. You can try re-plugging the connectors on the BCM or in the long run you may need to get the BCM re-programmed or replaced.
Do you hear the High Beam Relay...on front of internal fuse panel...chattering while the high beams are flickering?
Edit to add:
I really do not trust the documentation too much as far as how the charging system works....there are so many contradictions between the Theory of Operation and what the circuit diagrams show. The Theory states that + 12 volts is supplied to the +side of the field coil from the ASD relay. The other side of the field coil is connected in series with the regulation circuitry inside the PCM to switch this other side to ground to regulate current....this is how it is done in my 2002 CRD. In actual fact the circuit diagram shows the other side of the field coil (Black wire) going straight to ground while the Brown/Dark Green wire goes via the BCM to... I presume a regulated +12 volts pulsed current supplied by the PCM.
So it is best to be very wary when following my advice of cutting the leads at the small plug and replacing them with a direct wire to ground on the one side and with a direct wire the pin 18 on C1 of the BCM...If I was there I could assertain which is correct...the circuit diagram or the Theory of Operation....I believe the Circuit Diagram is correct and that the Black wire goes direct to ground and the Brown/Dark Green wire goes to Pin 18 on connctor C1 of the BCM and that the BCM in this case is regulating the Positive side of the field coil
You need a meter capable of seeing a fluctuating voltage across both the battery and the headlights!