Before we start, Direct-Shift Gearbox, or DSG, is the trade name Volkswagen and Audi use for what is more generally called a Dual-Clutch Transmission, or DCT. Most people will be more familiar with the second name and acronym, so I'll be mostly using "Dual-Clutch Transmission" and "DCT" in this answer. See the Wikipedia article on DSGs for reference.
Now, on to your question. Can upshifting while on the brakes or downshifting while on the throttle damage your DSG/DCT gearbox? In short, No, doing either of these things *will not cause damage* to your transmission or to other parts of your vehicle. However, this misconception does stem from an actually real quirk of how DCTs shift, and honestly the article you linked does a horrible job of explaining what this quirk is or why it occurs.
Okay, where does this misconception actually come from? This is going to be a rather long explanation but I'll try to keep things as concise as possible.
Some background on DCTs
In layman's terms, the primary reason DCTs can shift so quickly is that they can "prep" for either a shift up or shift down of one gear. The transmission's control unit constantly monitors things like throttle/brake pedal position, engine RPM, current speed, and acceleration to try and predict what direction the next gear shift will be in. It then uses that prediction to prep the corresponding gear in the background until the actual shift needs to be made. When the shift is finally triggered, the transmission only has to engage the prepped gear while simultaneously disengaging the current one, and the shift triggers instantly with virtually no time spent out of gear.
The catch here is that while the control computer's prediction is usually quite good, it's not always perfect, and sometimes the transmission will suddenly need to shift in the opposite direction. This can happen either due to a sudden change in driver input in automatic mode, such as slamming on the brakes, or in manual mode when the driver simply shifts in the other direction.
If this happens, the transmission needs to take the time to un-prep the incorrect gear and then prep the correct one before it can do its lightning-fast engage/disengage actual gear shift. In automatic mode you likely wouldn't notice this at all, but in manual mode there will be a noticeable and unexpected delay between the instant you trigger the shift and when the transmission actually shifts out of the current gear into the next one.
As a side note, on some sportier cars with paddle shifters, the paddles may have a half-pressed position that overrides the computer's prediction and preps that gear before the fully-pressed position where the shift is triggered. Check your car's manual on that one.
What does happen when you shift up on the brakes or vice versa?
Now we finally get back to where we started. Those two things the article says not to do - shifting up while braking and shifting down while accelerating - are both scenarios which are very likely to catch the computer off-guard.
In general, if at any given moment you're currently braking and slowing down, you are most likely to either continue slowing down to a stop (and therefore need to shift down) or let off the brake pedal and just coast at your current speed (in which case being prepped for a downshift doesn't hurt anything). Only very rarely are you going to suddenly shift up into the powerband and slam down the gas. Therefore, the transmission is most likely going to be prepped for a downshift while you're braking. Upshifting then would require that un-prep and re-prep delay, which you as the human driver might not expect and can feel like something went wrong with the shift.
Likewise, if you've already been accelerating for the last few seconds (such as when getting on the freeway), at any given point you are likely going to either continue accelerating (and then need to upshift to stay in the powerband) or let off the gas because you've reached your desired speed (and then upshift for lower RPM and better fuel economy). Suddenly downshifting with your foot still down on the gas pedal is something the computer wont anticipate, and cause that delay before the shift.
I should note that the computer's predictions are not as simple as "foot on gas, prep up; foot on brake, prep down." If you've been cruising at 2200 RPM and then start to depress the gas pedal further, the computer will anticipate a shift down to bump your RPM into the powerband, even though your foot is on the gas.
Similar logic applies to your example with beginning to climb a hill. The throttle opening wider but speed not increasing as much as it should must mean the driver needs more power, so the computer preps a downshift into the powerband.
I'm no expert on predicting what a driver's next gear shift will be, but I'm certain there's a ton of research that goes into developing these prediction algorithms. Some cars that have a switch from economy mode to performance mode will likely have a different algorithm for each mode. I wouldn't be surprised if there's machine learning involved, so each car gets better at predicting its individual driver over time. The possibilities here are near endless, but the point is that these predictions are actually quite good.
- Upshifting while on the brakes or downshifting on the throttle might cause the shift to be delayed if you catch the transmission's computer off-guard.
- When this does happen, the shift may feel wrong or strange due to the delay, but things are happening as they were designed.
- So long as you aren't abusing the car, this is not an issue and will not damage your car.
- As a general rule of thumb: if you wouldn't enter that gear with a stick-shift transmission, don't try to do it with your dual clutch transmission.
If you're interested in learning more, I'd recommend watching Engineering Explained's YouTube video 5 Things You Should Never Do In A Dual Clutch Transmission Vehicle. The part that's relevant to your question starts at 3:41 but I'd recommend watching the rest as well if you're interested. He does a much better job of explaining this topic in detail, and he also has some other videos illustrating the technical details of how Dual-Clutch Transmissions work.