Some of these
categories were hereditary, others not. Their treatment was pretty rotten,
although I don't know if it fits into your fanfic or not.
Burakumin. As I recall it was a situational condition until the
extablishment of the Tokugawa Shogunate. This was one of the most stable
periods in Japans history, however one aspect of that stability was that ALL
occupations became hereditary. Even after the Meiji Restoration eliminated
this, there was a great deal of sentament opposing leting the Burakumin do
anything but their old heriditary jobs. To this day there's a strong prejudice
against anyone who's discovered to have Burakumin ancestry.
Anyways remember that it's seldom a religion that causes problems, it's
the organisation built around the religion that can make life hell for some
people.