If you develop longer you will get better shadow detail, but less highlight detail.....
This is a misconception, nothing fixes underexposure. Reducing exposure reduces the shadow detail on the film, period. That doesn't mean the print will be immediately affected, the film rating typically provides a bit of a safety margin.
As you reduce exposure there is less and less shadow detail available on the negative, once
camera exposure is reduced enough to use up the normal
print safety margin your print starts losing shadow detail, period.
Adjusting film development is meant simply to change the contrast rate of the print, the way the negative looks is actually irrelevant as long as the print works out.
The highlight detail is not reduced when extra development is added, it simply moves those tones higher on the film curve, that change just requires a little more effort (burning) to get the highlights back in the printable range.