What happens once my parents are with me in Austria and I lose my job? Do they get access to social benefits from Austria?
At least in the first few years, your parents' status depends on yours as does that of your spouse and children if they are not EU citizens themselves. That means not only social benefits but also the right to reside in the country itself. If you lose your job, you should have the right to stay to look for another job but Austria does not necessarily have to pay any benefits to your family (see ECJ cases C-67/14 and C-333/13).
If you are not considered a worker, you can be asked to show that you have enough money “not to become a burden on the social assistance system of the host Member State” to keep your right to stay in the country. Most discussion of this principle handles spouses but to the extent that your parents qualify as part of your family, I would expect the same logic to apply. That would mean that you need to show that you have an income or wealth high enough not to qualify for generic welfare support (whatever that may be in Austria).
One complication that the relevant benefits are generic welfare benefits (e.g. ALG II / Hartz IV in Germany). In theory, it might still be possible to qualify for some other benefits (especially child benefits) even if you do not qualify for or need welfare benefits. While it's about a different issue (the requirement to prove that you speak German to qualify for Wohnbeihilfe), there is a case pending in front of the ECJ that could have consequences on that (C-94/20).
In practice, if you don't have a job, your situation is much more precarious and there is more at stake than your parents' benefits. Applying for any benefits could prompt the Austrian authorities to check your status and not only deny payments but also ask you to leave the country (I am writing “could” because there are some corner cases and countries that do not enforce this very carefully).
What happens if I was able to find another job later but it doesn't have a decent pay that allows me to cover the expenses of my parents. For example I'm married and I have a kid, so what if due to my lower income I can't afford a bigger apartment and I need to down-size and can't host my parents with me. Would my parents be able to get access to social benefits to pay for their rent?
If you work and your work is “effective and genuine” then you and your family have a right to stay that is not conditioned on your income or need for any benefits. As explained above, it's only if you're not considered a worker that these things can play a role. There is a lot of case law establishing that workers are entitled to housing or family benefits if they qualify under local law and that claiming those benefits should not lead them to lose their right of residence.
The main difficulty is that parents (of adult citizens) do not have a right to reside in the EU qua parents. It only works if they are dependent on you, see article 2(2)(d) Directive 2004/38/EC. The less you contribute to their expenses, the more precarious their claim to reside in the same country. If you meet that threshold and can somehow show that they cannot live without you (you pay for groceries and other things, maybe you help them in person) then they should be able to remain in Austria and possibly even claim some benefits. If you do not, then once again it's not only their right to claim any one benefit that is at stake but their right to reside in Austria in general.
Would I be able if i return to Germany to take my parents with me? if yes, can they access social benefits in Germany as well?
It would be a kind of Surinder Singh case. It might be possible but will require careful documentation. I would recommend hiring a lawyer. Otherwise, your parents would have to qualify for a residence permit under German law and I don't think there is one for parents of adult German citizens.
Keep in mind that all of this goes beyond the most straightforward freedom of movement rights, which cover EU citizens and their immediate family. You have to be prepared to be challenged on your parents' dependence on you and to face skeptical civil servants who don't know which category they fit in.
Finally, note that the clause allowing your parents to reside in the EU also covers dependent parents from the spouse of an EU citizen. If your husband is an EU citizen then you are both an EU citizen but also the spouse of an EU citizen. If he has a job you could therefore turn things around and use his situation (rather than yours) to sponsor your parents. That would cover all of you (you, your child, and your dependent parents) even if you yourself are unemployed. You would still need to show your parents are dependent on you.