I never thought of myself as VERY religious when I was in my teens, but I definitely thought I was more religious than most. In retrospect, compared to most I was probably VERY religious. That being said, I've maintained about the same level of religiousness until the past 2-3 years. With life stresses and stuff, I have unfortunately let myself slip. Having seen how non-religious people are these days is making it harder for me to be religious as well. But I'm trying.
The deeds of your ancestors do affect you, but they don't determine your ultimate reward or punishment, i.e. heaven and hell.
That is the bottom line, the short version. This is a complex topic, even in Islamic Theology, similar to the topic of free will.
From what I have read, each person has a range of 'goodness' or 'badness' they can attain. This range is constrained by things like level of education, family background and upbringing, deeds of their ancestors, etc. As long as the person reaches the level of more than 50% goodness within the range that they have, they can attain paradise. In other words the 'goodness' of their good is greater than the 'badness' of their bad. Some people reach 50/50 and they will be judged by Allah (سُبْحَانَهُ وَ تَعَالَى) and their fate isn't clear. The ones with less than 50% goodness will be exposed to punishment from Allah (سُبْحَانَهُ وَ تَعَالَى), whether that is the ultimate punishment in hell, punishment in this life, or in the barzakh(intermediate realm between death and the Day of Judgement). Some will ultimately make it to Paradise after they undergo this punishment. Some will never get there, it depends on what they did.
That is why we say the Holy Prophet Muhammad(p.b.u.h), and the Imams((عليه السلام)), and the Prophets all had pure lineage. In other words, their direct biological ancestors, (mother, father, grandfather, grandmother, great...) were all on the right path, i.e. they followed the Prophet of their time and were not idol worshippers. So their 'range' or potential for goodness at birth was much higher than the normal person. When they fulfilled that potential, they were rewarded with being chosen by Allah (سُبْحَانَهُ وَ تَعَالَى) to be a Prophet or Imam.
When we fulfill our potential for goodness within the range we were given, we will also receive our reward. We may not be a Prophet or Imam, may not be able to feed 10,000 orphans or save a whole nation from destruction (as Prophet Yunus did) but we can do many good acts which we have the ability to do, and thus fulfill our potential for goodness.
If you ask Him for help with tears in your eyes then it was answered. How it was answered, we'll only know later. I remember once Allah broke the engagement of someone right after he prayed to Him for help and blessings. At the time we couldn't understand what was going on, but then it turned out that she was cheating on him and Allah was doing him a GIANT favor.
Maybe you were supposed to get a worse grade and He helped, maybe instead of helping you with one exam He wants to help you academically later in a more significant way, maybe He wants to see what you'll do if he withholds His help for a little bit, maybe He put you through this so you'll be scared into being an even better student (that happened for me and now I'm the best student in class). Only He knows. But you have to trust in Him and not hope for or expect anything specific when you ask Him for help, because maybe the best thing for you is something you hate or something you would have never expected
وَلَوْ أَنَّهُمْ رَضُوا مَا آتَاهُمُ اللَّهُ وَرَسُولُهُ وَقَالُوا حَسْبُنَا اللَّهُ سَيُؤْتِينَا اللَّهُ مِن فَضْلِهِ وَرَسُولُهُ إِنَّا إِلَى اللَّهِ رَاغِبُونَ
And if they were content with what Allah and His Messenger gave them, and had said: Allah is sufficient for us; Allah will soon give us (more) out of His grace and His Messenger too; surely to Allah do we make our petition. (9:59)
Why the above verse mentions the prophet (صلى الله عليه وآله وسلم) here if you think your thought as true.?
I have mentioned the verses of quran to clarify and explain the view instead of any misconception:
How do you accept that the prophets, imams and chosen representatives of Allah (سُبْحَانَهُ وَ تَعَالَى) can not benefit us (like Dua Tawwsal) with the permission of Allah (سُبْحَانَهُ وَ تَعَالَى) ?