The way a warehouse function is not related to profit. The size of a warehouse is related to profit and how fast the goods are required to move. The logic for why a warehouse exists is rarely directly for profit. The segregation of why and how a train line is used vs a truck line is not related to profit.
The purpose for a warehouse is, as I've said before, buffering, freight mixing, and transhipment.
To define Buffering: Without warehouses, producers would have to store goods. For most applications in X4 and in real life this is "bad™". Why? Well, let's pick on how dry goods for most North American grocery stores work. Typically you have 3 types of goods. Goods that can be delivered daily, goods that can be delivered weekly, and goods that can only be delivered monthly or seasonally. In X4 terms think of these like water, hull parts, and engine parts respectively.
Without a warehouse, the instant a local surge of sales occurs for any reason such as BBQ season or, in X4s case a surge of shipbuilding, engine parts is impossible to "deliver" at any speed that would satisfy demand quickly or efficiently unless you happen to be right next to the factory. Most places in X4 are not in this category. In real life, the BBQs themselves would be the limiting factor due to the reality that you have the option of slowly producing your inventory over a year in a small but efficient factory.. or you have to produce them rapidly over a very small window at a price premium. Which do you think most real-world companies choose to do?
So what do they do? Even if it technically costs more money to store the product than immediately ship it in bulk the OVERALL efficiency of the slower year-round production is prefered AND cheaper. Warehouses buffer goods needed in bursts for specific applications.
They also buffer applications of goods like paper products. In X4 lets call them "hull parts" since they are about as widely used. Do you want to get goods from 12 different outlets or would you prefer ordering from one stop shop for all your business and commercial sales needs? Warehouses in these cases cause a median price cycle which keeps prices in multiple far-reaching locations similar provided it can maintain stock efficiently over time. Sudden surges can cause price movements but it requires a surge far higher than a local event like a natural disaster. (no we aren't going to argue about war or disaster profiteers. we are talking yearly price medians)
------------
Prices actually fluctuate far more up and down than you think. The more years in your dataset the more you will see a positive trend. If you narrow that to yearly you will find it cycles even as it makes that slow march upwards.
Example. Meat in Canada is 15% cheaper this year. Guess what any sane economist is going to know will happen in 3 years? Meat will start to rise as people migrate to the cheaper option to feed their families. Capitalism will always have a natural trade cycle.
What you think is a cost in warehouses actually isn't. Inflation is a FAR more complex subject. Goods and currency increase mainly due to demand push and population growth. The more a good exists and the greater its impact on someones lives the more people who don't have that good want that good. That is the primary increase you will see. The cost increases for warehouses are mostly neutral and have been for the last 50 years. While they do get more expensive to run over time that is mostly due to the WORKERS themselves getting more expensive... which is again part of that demand push inflation effect. Even automation costs haven't really impacted the warehouse world anywhere near as much as you think. The long term savings actually end up making them more efficient since machines really don't have a demand push(yet).
----------------
Ok boring parts over lets address this point:
In the specific context of X4, such discount practices do not fit with the overall economy model. You want to make the major profits then the only way you are going to do so is by investing in production facilities and managing them appropriately. Leave things to the AI and without appropriate planning such facilities are likely to run at a loss due to the automated pricing strategy being at least a little too simplistic and not giving due consideration to manufacturing/production costs.
The economy of X4 is "stuttering" not "cycling". All trades happen within a very narrow band that typically keeps prices near their lowest points for almost every single trade. In the X4 trade world basically no trader ever even attempts to buy a good from a factory that isn't full. Exceptions exist yes but for the majority of the time, this is true.
A discount of 5% for goods trades over 35,000m3 would cause no current production station in X4 to lose money excepting of course the resource tier at the bottom which already loses money. Just for a horror fact for you... Most stations would still be profitable at MINIMUM PRICE SETTINGS if you gave a 30% discount for sales over 35,000m3. Now you can see why I really REALLY want to tweak production eh?
The TLDR is it would only enhance player trades(or AI if you wanted them to trade like this too) and have precisely ZERO impact on the overall economy as it currently stands. It would most certainly not cause any sort of economic collapse or harm.
Honestly, if you wanted to make the price scheme actually interesting a simple random time period scalar adjustment would be interesting and low cost. It would certainly force people to diversify goods and pay attention to the market if they really wanted to trade(even station trade). (Just so we stay on the same page I mean a system which selects its current range within a larger range. IE Quantum tubs have a price range of 150. Right now that's between 225 and 375. If that range remained 150 but would randomly slide up or down a price range of 175 and 425 once a "year" it would certainly allow for losses to occur!.. and great proffitssss..
)
---
On an offside discussion, I actually agree with you for the most part that the mogel point of view should be centric on stations. I still think a bit of trade segregation paired with some production tweaks would drastically help the economy in the long run though. Allowing the player to build routes isn't against the foundation model. If you consider a decentralized production style it makes very good sense. What about the player who wishes to mine in sector X and produce in sector Y? The tools are.. lacking. You can make it work but it would be nice to have the option since this is the foundation of a players world.. not a structured sandbox required to be played a single way.