That's the job of the game designer to balance the professions.
Can't practically be done in a pure PvP environment. Works in PvE because the NPCs don't have to worry about their budgets, but can't work in PvP. The whole trader/pirate/hunter economy is not actually realistic, so it's impossible to balance it.
Basically:
- if trade profit margins are small, even a tiny chance of pirate success means the traders make a loss overall [this is currently true]
- if trade profit margins are large, pirates are required to successfully steal significant goods from the traders to stop trading being excessively profitable (to the point where the pirates would make far more money from honest trading anyway)
- if pirates can easily intercept traders, then hunters can easily intercept pirates, and will then easily destroy the pirate (more easily than a pirate will steal from a trader)
- if pirates can't easily intercept traders, then hunters can't easily intercept pirates, and can't make money [this is currently true]
- to prevent "free money" exploits, the destruction of a pirate by a hunter must be a net cost of credits: the pirate's expenses from being destroyed must be more than the hunter's fee. [this is currently true]
- to prevent economic death spirals, interactions must be either zero-sum or positive-sum (balancing professions by ensuring that frequent resetting of your save is the only way to keep your credit balance positive is a solution but not a fun game)
- if big ships are more powerful than small ships, credit imbalances between professions get rapidly magnified
- if big ships are not more powerful than small ships, running costs of big ships make them worthless
If you wanted to even get close in Elite, I think you'd need to do something like:
- massively shrink the bubble. One system of each economy+superpower combination, with stations at least 300 Ls from the star, and that's it. Turn every tradelane into an active warzone in supercruise.
- clean ships do not pay rebuy, other ships pay much less than now
- remove all ships bigger than a Cobra III
- make the typical sell price for trade goods several times the buy price.
- remove the stolen goods rules
That would be a completely different game mostly unlike Elite, and one impossible to practically reach from the current state of the game, so it's not even worth considering.