nth-child is very useful for many things, however in this case I think it’s probably dangerous. Since it’s based solely on numbers, for this it would require a guarantee that Badges will remain in the same position.
If something else is added/removed/moved before it, the position of Badges will change which could lead to Badges being revealed, something else being hidden and that may go unnoticed.
:has() is ideal for this, however sadly its support is still limited, notably it’s disabled by default in Firefox and is missing from many mobile browsers.
If hiding it isn’t critical for you, i.e. it’s acceptable to hide it where possible for best experience while being visible in browsers that do not yet support :has(), you can use the following selector:
sidebar-section-link-wrapper:has(a.sidebar-section-link-badges) { display: none; }