If I have been missing some parts of my body in Ghusl while thinking that it was valid, have all my past prayers and good deeds gone to waste?
If you are sure that you did not make the water reach to any part of
your body, then the Ghusl is invalid. Even if you did not know that it
was compulsory to make water reach to every part of yor body.
You need to re-do all the obligatory worships like Salaah, fasting etc which
you did without a valid Ghusl. The reward for your previous deeds will
never be wasted by Allah SWT, but you must re-do it as it was being
done without valid Ghusl. You can perform the Qadha gradually.
Wassalam.