Well I believe some of the high-end CMs will state their margin on components up front, and are happy to show you their supplier invoices for verification. Or that has been the case in the past, and possibly not uncommon in the current market where prices have skyrocketed. You will still need to do some legwork to get a good feel for your target BOM cost, but it will be pretty volatile right now.
Assuming we are talking decent order quantities, the CM should also be able to provide a supplier Declaration of Conformity, along with date codes or batch numbers for tracing purposes - especially for parts where you have nominated suppliers or "no generics". Now whether what they show you is true or something they made up is another matter, but if concerned you should be able to verify.
Most of the time I run small assembly jobs in-house, or use an assembly house that accepts or prefers a BOM kitted by me. That isn't generally practical with an overseas CM, so you need to build a relationship maybe with a local company that has their own overseas factory. Having a local company responsible can be important if there is ever a legal dispute.
Here is something I found earlier which may give some insight into how the big manufacturing contracts are written (if you like reading legalease)
https://www.lawinsider.com/contracts/kTKQAyt1zjY