I can’t tell from the pictures exactly which insect this is. The insect may be damaging the tree or it may just be nesting in the tree. Your photo shows an old vertical crack which has been there some time, and the opening may have allowed these insects access to make a home. The loose bark is more of a concern, and may indicate the tree has some rot fungi.
There are a couple of things you can do to get an accurate diagnosis. Firstly, you can submit samples of the insects, choosing the best examples that are in the best condition, And send them to MSU diagnostic lab for identification. Send photos, one including a shot of the whole tree, one of the trunk showing the whole crack, to the MSU Plant and Pest Diagnostic lab - . https://www.canr.msu.edu/pestid/submit-samples/
Secondly, you can consult a certified arborist who will come on site and can identify the insects, any other health issues with the tree, and give you a plan of action. This would be the most efficient way to identify all the possible issues that the tree may have.
Certified arborists are professionals who have taken training in care, diseases, pests and passed certification tests. Compared to the cost of losing a large tree, the cost of an arborist visit is modest. Find certified arborists by zip code here—-
Here is a reference that shows some of the common issues with loose bark-
Thanks for using our service.