In astronomy, would it be possible to continue doing postdocs for up to 15 years to increase your chance of getting a permanent position? I heard that in astronomy most people do only one or two postdocs. If they haven't found a permanent position after this, they quit astronomy and find a job in a different field like physics, economics, or information technology. And the vast majority of people who get a PhD in astronomy will end up quitting astronomy because the astronomy is one of the hardest field to get into.

But suppose that your parents were rich and provided you with more than enough money to live for as long as you wanted, which means that you have no pressure to quit your postdocs to get a job in a different field than astronomy in order to earn more money.

Would it be possible to continue doing postdocs after postdocs for up to 15 years (so up to 6 postdocs) to increase your chance of getting a permanent position compared to those who only do one or two postdocs?

Or would doing more than 2 postdocs not increase your chance of getting a permanent position anymore? Maybe all employers reject people who do more than 2 postdocs because they all see them as failures, no-good, incompetent and unskillful?
This question to some extent revolves around a purely semantic issue, namely what is a postdoc? Many areas in academia have a small number of "soft money" research positions that a researcher can hold, sometimes for many years. When a researcher has an independent source of funds and doesn't need to be paid, I imagine that can only improve his/her ability to obtain such positions. The questions that need to be discussed in connection to your question are therefore:

(a) Do such positions qualify as "postdocs"?

(b) Is there a chance for a researcher holding such a position for up to 15 years to eventually transfer to a tenure track position?

I'm not in astronomy, but from a general STEM perspective I would argue that the answer to (a) is no, and the answer to (b) is yes.

Specifically, with regards to (a), the point is that "postdoc" is not a technical term (at least not one whose definition is universally agreed upon), but an informal label we apply to an interim position a researcher holds for a few years after finishing their PhD and before finding a permanent/tenure-track position. Talking about someone being a postdoc for 15 years is an oxymoron, as it stretches the term way past its conventionally understood meaning. Linguistically it would be like talking about a "50 year old child."

With regards to (b), I think it is indeed very possible for a researcher to transition to a faculty position from any other type of position, provided they have been doing high quality work. An extreme case (but not necessarily the only case) would be a researcher who makes a single very important scientific discovery that propels them to scientific stardom. I would imagine that it is absolutely possible for this to happen to a non-faculty researcher in astronomy. Whether it's likely to happen is a completely different story of course, but given that the premise of OP's question is that landing a faculty position in astronomy is already highly unlikely even in the normal way, I don't see why this approach is any less likely to work than the more conventional one.

To summarize, my (non-astronomy-specific, as I said) opinion is that although a soft money researcher may suffer from a certain minor stigma when it comes to applying for faculty positions, this by itself will almost certainly not be a deal-breaker, and when it comes to being evaluated for such positions, to a good degree of approximation everything would depend on the work they have published.