On top of this, in certain fields, costs appear to remain stable and even go up a bit over time. In these industries, there typically isn't much demand for lower specc'd (AKA outdated) hardware. Often these products last such a long time that the used old models serve as the low cost market. Apple even copies this model by keeping their older products around longer than other companies and selling them at a lower cost.
In addition, the development of many industrial electronic products is extremely expensive and the markets are small (think 100s to 1000s per year). The company typically has to charge a very high price to stay in business.
While it's easy to look at something and think "I can make that with an Arduino or Raspberry Pi," this is basically the hardware equivalent of telling people you can make Facebook in a weekend (which used to be a popular claim here on HN years ago).
It takes a special kind of company, almost a bank, to stomach that kind of risk. And this extraordinary risk also demands extraordinary rewards.
Medical technology isn't really the same thing.
Actually, depending on your precise definition of "same order", I could argue it already is. And while the gross margin will seem high if you are only used to consumer stuff, this is an almost useless metric for low volumes, where the net margin do not necessarily follow.
There are also not a ton of different vendors, so even dreaming about mutualizing some R&D costs (and that will mostly not happen), you would not save a lot.
Once again, cheap portable machines (but not able to do a lot) already exists.