Re Hello everyone!
So the best answer will be attributed to @Konti : even if I found elements to unlock me in many other answers, it is his that allowed me to move forward the most (and this despite the fact that his code is written in C#).
Thank you @Konti !
Here is the solution in detail:
Indeed, as the @Konti code shows, it is the error code 51 swSketchErrorExtRefFail that should be used.
When a component is deleted without removing its associated constraints, the constraint references take a flag **External**

For some reason, the first idea I had was to check the component associated with the wobbly constraint reference entity didn't work: there was still a filename associated with it, but it had nothing to do with the original one. Brief! Incomprehensible.
The condition for this to work is that the system option Treat missing constraint references as errors must be checked (precisely in order for code 51 to be associated with the constraint).

CAREFUL!! If a file is missing (i.e. SW can't find it), it appears as deleted in the tree and for all configurations if there are any, and the constraints associated with it also go back to error code 51; It is therefore necessary to think about solving/finding these components before exploiting the macro.
The other problem I encountered is related to the function of grouping constraints by status (*Thanks to @Sylk for making this display option appear in one of his posts):
If the constraint is a subfunction of the Default Constraints feature in the tree of an assembly, the user folders or auto-grouping folders are at the same level and must be discarded before analyzing the constraint.
There you go! Thank you all once again.
Below is my code:
Option Explicit
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swModelDocExt As SldWorks.ModelDocExtension
Dim swSelMgr As SldWorks.SelectionMgr
Dim swFeat As SldWorks.Feature
Dim swMateGroup As SldWorks.Feature
Dim swSubFolder As SldWorks.Feature
Dim swMateFeat As SldWorks.Feature
Dim swSubFeat As SldWorks.Feature
Dim swMate As IMate2
Dim swComp As SldWorks.Component2
Dim swMateEnt(2) As SldWorks.MateEntity2
Dim fileName As String
Dim Error As Long
Dim IsWarning As Boolean
Dim i As Long
Dim DeleteOption As Long
Dim status As Boolean
Dim Append As Boolean
Dim Mark As Integer
Dim List As Boolean
Sub main()
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swSelMgr = swModel.SelectionManager
Set swModelDocExt = swModel.Extension
'Get the first feature in the assembly
Set swFeat = swModel.FirstFeature
'Iterate over features in FeatureManager design tree
Do While Not swFeat Is Nothing
If "MateGroup" = swFeat.GetTypeName Then
Set swMateGroup = swFeat
Exit Do
End If
Set swFeat = swFeat.GetNextFeature
Loop
Debug.Print " " & swMateGroup.Name
Debug.Print ""
Set swSubFeat = swMateGroup.IGetFirstSubFeature
'iterate over subfeatures (Mate or folders)
Do While Not swSubFeat Is Nothing
If "FtrFolder" = swSubFeat.GetTypeName Then
'--------------------------------------------------------------------
Debug.Print "swSubFeat TypeName: " & swSubFeat.GetTypeName _
& ", Name: " & swSubFeat.Name
'--------------------------------------------------------------------
GoTo Line1
ElseIf "GroupedMatesFolder" = swSubFeat.GetTypeName Then
'--------------------------------------------------------------------
Debug.Print "swSubFeat TypeName: " & swSubFeat.GetTypeName _
& ", Name: " & swSubFeat.Name
'--------------------------------------------------------------------
GoTo Line1
End If
'MsgBox swSubFeat.GetTypeName
Set swMate = swSubFeat.GetSpecificFeature2
If Not swMate Is Nothing Then
Error = swSubFeat.GetErrorCode2(IsWarning)
' Error 51 ?
If Error = 51 Then List = swSubFeat.Select2(True, 0)
End If
Line1:
Set swSubFeat = swSubFeat.IGetNextSubFeature
Loop
'Delete List
' To delete absorbed features, use enum swDeleteSelectionOptions_e.swDelete_Absorbed
' To delete children features, use enum swDeleteSelectionOptions_e.swDelete_Children
' To keep absorbed features and children features, set DeleteOption = 0
DeleteOption = swDeleteSelectionOptions_e.swDelete_Absorbed
'DeleteOption = swDeleteSelectionOptions_e.swDelete_Children
'DeleteOption = 0
'DeleteOption =swDeleteSelectionOptions_e.swDelete_Absorbed + swDeleteSelectionOptions_e.swDelete_Children
status = swModelDocExt.DeleteSelection2(DeleteOption)
End Sub