Trust me, saying all of history is composed of two groups of people is a gross oversimplification based on a philosophical (not scientific) root, that clearly is made to enforce that "us Vs them" mentality
Please engage with even one of the many sources I have kindly provided for you. You will be better for it. I would recommend the videos, they're not very long, and the explanation manages to be thorough yet concise and understandable.
Also, Marx and Engels were bourgeois themselves. They knew and were fine with the knowledge that, if an "us and them" mentality were to emerge out of revokution, the two of them would be in the "them".
They weren't running for office. They weren't leading a movement. They were just theorising based on the material conditions. There was no need for them to try appeals to group mentality.