Don't forget that the cost of designing something must be paid for as well -- this design work can either be paid for upfront as non-recoverable engineering (NRE) costs, or can be factored into the cost of the item being built. If the NRE is (for example) $500,000 and the cost is being spread over only a 100 devices, that's $5000 per device in just design costs to be covered, but if spread of 100,000 devices, that's $5 per device. At those two scales, (100 vs 100.000), the number of units per year or month also need to be considered--if you plan on making 100,000 units a month, additional NRE in the assembly line to drive the per-unit assembly cost down is also worthwhile, while if making only 100 devices a year, it's likely cheaper at that scale to not make that assembly line investment.
Basically if you intend to sell 100,000s of devices per month, you can invest in the manufacturing line and parts supply chain that makes those devices cheap to make, but if you are making only 100s of devices a year, you can't and everything becomes expensive to purchase and expensive to assemble. (This is why the Ford Model T was so much cheaper than other contemporary vehicles--its assembly line made it really easy to produce multiple cars a day while other manufacturers didn't have that production scale. This is also why its been reported that Apple can make aa ~$400 profit on a sub-$1000 laptop while companies like Acer, Dell, HP, and Lenovo make an average of $1.50 in the same price range--Apple makes vastly more of a single design than any other laptop manufacturer.)
On top of that, your consumer phone is not expected to operate continuously in austere environments (continuously exposed to the elements in Arizona summers and Minnesota winters as examples, rubbed against by animals, pissed on by vandals), nor has it been designed and tested to be part of a safety critical systems (this adds to the NRE). Even though specialized computers are made that do operate in austere environmental conditions and are certified to be included in such systems, the design of that system may be that there are multiple redundant such devices in the system.
So what does that have to do with hot box detectors?
A Hot Box detector is frequently multiple sensors, often track mounted, one or more systems in a cabinet monitoring the sensor and reporting the results to both the engineer in the passing train via directional radio and to other sites (i.e., central dispatching) via cellular and may be colocated with an AEI reader (so the system is able to not just report that the hot box is on the 123rd axle of the train, but is on the 3rd axle of car RBOX 987654). So while every part of the detector site is definitely more expensive than consumer electronics, the parts are not that expensive, and the overall system isn't cheap, and at this point I'll posit that the installation labor and site prep is likely more expensive than all the components combined.
Regarding the rubber hose idea: a broken bearing is too far from the train line hose to cause it to dump due to heat unless you route the air lines to be adjacent to the bearings and run the risk that the rubber will force an emergency dump merely by being in the sun on a summer's day.
Sidebar: my company makes specialized software (and soon, hardware), for a small and highly regulated market. We have to take the software and hardware combination (even if the hardware is commodity off-the-shelf hardware like a Dell rack mounted server) through an independent security assessment that is easily 1-1.5 million dollars every couple of years and may last a year in itself, and even after that, the labor involved in verifying the software was installed and configured correctly at each site to the satisfaction of the regulator is often significantly more than the cost of the software, hardware, and supporting systems combined.