Please read post #28 in thread
https://www.rootschat.com/forum/index.php?topic=863488.27This is the method that I use and often suggest to rootschatters.
You can also use The Leeds Method to group your qualifying matches, there is a website explaining it.
https://www.danaleeds.com/the-leeds-method/Once you get a tree built with the DNA matches incorporated into it then if you upload it to the WATO tool in DNA painter that should give you some help.
Endogamy may well screw results so may affect your results.
To give an example I have a 364cM match whose shared cM level is significantly higher than should be given the relationship we have with each other. Her First Cousins share cM levels with me that she should share. As many other matches exist and all have the expected cM level the only hypothesis that works is that her Father was the product of an endogamous relationship despite all the BMD records showing otherwise. I have reached out to the family many times but despite contacting different family members they have all closed ranks and will not respond.