I think it was one of the religious leaders in history that said "Don't try to fly", meaning don't jump off a cliff or try to do what you can't do. Many translate that idea today to mean don't even fly in an aeroplane, and they connect that with some kind of religious belief.
In Buddhism it is possible that that teaching was to the poor who were possibly oppressed by the system. Wanting out of this system would cause great anguish. Accepting and living gracefully would give a sense of control and bliss.
A mentally healthy person can live happily in wealth or poverty, if there is wealth around or you are capable of creating it, why not? If it's going to cause unreasonable risk, suffering and sacrifice, it would be wise to choose another goal, or another method.
For instance, a person in jail, can they create or enjoy financial wealth if they are in jail for life, it would be painful to try to do so. They should rather start with what they have and build gradually. Desiring unreasonable outcomes does cause disappointment and a sense of poverty. Poverty consciousness can cause one to focus on what they don't have. What you focus on increases - the poverty increases due to unproductive focus.
Focusing on what you do have, and on what you can do, causes gratefulness, and prosperity consciousness. Prosperity increases due to productive focus.
If you're already living in wealth there is no need to all of a sudden and piously try to think that you will gain something by deciding you don't want what you've got. Appreciate what you've got and build gradually.
Kind Regards
Grant