I worked in embedded (mobile phone OS) about 8 years ago (UK). The pay was appalling for such a high-skilled job. I could have doubled my salary if I changed to flinging out JS for some website.
The pay is appalling in the UK. The "problem" with businesses that build hardware is that there is a lot of additional work that needs to be done to make something physical. The extra headcount means that developers can't demand prima donna compensation. If the base compensation for pure software devs is already low in a country, then it will not be able to sustain a domestic electronics industry.