Those are absolutely terrible companies for software developers to work for though. I have several family members that work for them. If you want average pay and the owners to take all the profits, go for it. Otherwise, work for FAANG, a great startup or a finance company (hedge fund or investment bank).
Nit: With some companies paying below average, too, by the very definition of the term 'average', and also because the sizeable handful of FAANG companies skews the average even higher.
I think that is sort of the point, though. If you are able to work/succeed at FAANG, you could build software in these niches quite profitably, because the competition is likely not all that good.