In an OTC account your profit is a claim on the broker. If the broker becomes insolvent, that claim ranks with other client claims against whatever client money survives. segregated-funds and an investor-compensation-scheme are the two defences, and both have limits.
This risk is not theoretical. Several brokers failed within days of the swiss-franc-unpeg in 2015, and clients in weaker jurisdictions recovered little or nothing.
Example: a client holds $180,000 with a UK-regulated broker. If the firm fails, FSCS protection covers up to £85,000 of the shortfall, leaving the balance dependent on how much segregated money is actually recovered.
Related: segregated-funds, investor-compensation-scheme, otc-market, offshore-broker