I think the problem with trade in that trade routes are static. Once you figure out that Sindria sells cheap fuel it will always sells cheap fuel. It is then easy to match two places together and repeat until your greed is satisfied. Solution to make open market trade interesting is to make prices dynamic.
Actually, it is easier to show on an example of another game. If you ever played Space Rangers 2 it is easy to draw parallels with Starsector: both a set in a "galaxy"/collections of stars, there are planets, space fights and you also drive a ship. This is where most similarities end, but SR2 actually got open trade way better than SS.
In SR2 planets got different population size, race (=faction), government and specialization. This controls focus of the planet (its primary imports/exports + volumes) and legality. But the thing is you are not the only actor in the galaxy. Even if planet imports luxury goods, others arrive to sell too, so over time it tones down both requested amount and price. As a result trading with average prices is still possible, but has miniscule margins approaching the cost of transportation - where AI reasonably stops doing it.
The real trade is driven by events. There is always something happening in the galaxy. Planets change focus, government is overthrown, there appears to be production surplus etc. This creates momentary supply/demand which drives prices. But those opportunities are timed. Other traders or opportunists will try to take advantage of those too. Which means every time you discover a good selling price, chances are there is already someone speeding there to get the profit. Also finding such a place is only a start. You need to buy the goods too, preferably a reasonable amount at a good price. This means taking a detour, wasting more time, and a higher chance to loose the opportunity.
Add to this that expanding your cargo hold is much more difficult and you often need to consider refuels on the way, which wastes even more time.
Sweet deal doesn't just drop on your lap because you walked into a bar. You have to figure logistic for yourself. You are never certain if you will be in time to take advantage so you have to judge how much risk you are willing to take. And every case is unique. Is it worth chasing incredibly sweet deal across the galaxy? Is it worth spending 3 more travel days for better margin or not? Those are absolutely real questions. Sometimes 3 days is what separates you from piles of cash and no profit at all. Just imagine how your heart sinks down as you watch 5 traders reach the planet right in front of you and find that prices dropped so low that you would be selling into minus. And you still take that, because you figured out another deal, need money for it and there is no time to seek a better buyer for the cargo you have.
This gameplay is both fun and addictive to certain kinds of people.
But doesn't just throw you to the wolfs. It has a mechanism introduce you to trading and to assist you.
First, there are galaxy news. It gives you a constant stream of updates on most notable happenings in the galaxy. Military victories, new discoveries, deaths of notorious pirates and venerated heros, but also big events on individual planets which - as you eventually figure out - affect prices.
Sometime it can cause scrappy last second decisions to eek at least some profit.
You can travel through a system and get a notification that there is an epidemic on nearby planet. Opportunity. So you rush off to closest place which sells medicine and buy any amount for whatever price. Because this is exactly what AI is doing. In a matter of days medicine market will be stripped bare in the vicinity of the system - everyone close who can trade will try to get in. If you want to make any money you have to take what you get. And if you travel farther away to get better price/amount, traders which start from that place are guaranteed to beat you.
Second, there is galaxy google search. While in a dock for a small fee it allows you to get information about anything in the galaxy. Equipment, hulls, individuals - market prices too. You kinda need to discover it yourself, but as soon as you do you will be spamming it on every chance. Opportunities from news are very profitable, but also very short lived and therefore risky. News attract attention, everyone knows about it and it is always a race.
Search allows you to find smaller fluctuations which don't make it to the news, but nonetheless profitable. They tend to stay for longer, but obviously if you can find it someone else can too. Time is still limited.
What about other risks like pirates? It is mostly an ambient threat. Choose routes wisely, read the news, sometime google notorious figureheads and keep some ransom money on you just in case. There is a very real tradeoff between cargo capacity and combat aptitude in SR2, but pirates are not around every corner to ambush you. Just another risk to weigh.
By the way, there are unusual ways to interact with pirates in the game. Here's a very real strat. During a pirate raid, supply chains are disrupted resulting in incredibly inflated prices for essential goods like food. You can buy a sufficiently big amount, travel to the system, sneak by pirates fighting local forces, run away from everyone else, pay off pirates which managed to chase you down and still sell for a sweet-sweet profit margin. Then spend time collecting food from debris of less lucky traders and sell it too. Don't look at me, money doesn't smell and I risk my life doing this.
Big risk, big reward. Do you ever consider doing similar thing in Starsector?
I wish devs just steal this setup and build on top of it. It won't be for everyone, but it isn't as if you are supposed to enjoy everything game throws at you. And it also will look a lot more organic than double -30% tax.