Marx never owned any factories - if anything he was near permanently destitute and often living off handouts from friends like Engels. A lot of his correspondence is complaining about money problems - often to Engels.
Engels family owned factories, and in fact his father sent him to Manchester to work at one to try to get him to turn away from his radical ideas, but which appears to have had the opposite effect. At several points his family basically threatened to cut him to try to get him to stop his political involvement, but kept relenting. You're indirectly right in that Engels certainly did profit via financial support from his family, and eventually, a few years before retirement, reached partner at the Manchester factory of the family firm.
The English experience was very well-understood by socialists and communists (Marx and Engels themself had kickstarted their efforts in Manchester, after witnessing - and arguably exploiting, given their ownership of factories - the terrible conditions of the industrial working classes). It makes sense that proper housing would have been at the forefront of the industrialization efforts in the USSR, to avoid ending up in those same conditions; but industrialization itself was being pushed at breakneck speed, forever negating any progress achieved on the housing side. Hence a perennial state of "we should do something about housing!!"...