Such is a community from the past. They are responsible for what they earned, and you are responsible for what you earned. You are not answerable for anything they have done.
تِلكَ أُمَّةٌ قَد خَلَت لَها ما كَسَبَت وَلَكُم ما كَسَبتُم وَلا تُسـَٔلونَ عَمّا كانوا يَعمَلونَ
tilka ummatun qad khalat lahaa maa kasabat wa lakum maa kasabtum wa laa tus’aloona ‘ammaa kaanoo ya’maloon