Perhaps a function of poverty is that people do need a vision for hope, and the message of religion is all about being on a journey towards a better place
I wouldn't agree with the 'function' of poverty but can't help wondering if a positive of poverty could be that people get the drift that we're all weak and vulnerable, and have zero control over what can happen in our lives. People who are 'wealthy' (which is relative, of course) are cushioned from this. Your point could illustrate the 'first shall be last and last shall be first' thing.
I liked the joke about the drowned man because it illustrates (to me) that God works through people.
I becmae a christian over 30 years ago (as I think I've said upthread somewhere) but a hideous thing blew up in my life and I cut God out completely for about 15+ years. No-one knew I used to be a christian. But my life got very painful again and I craved comfort. I chose to go to the cathedral, snuck in at the back 1. to hear the music 2. to hear the ancient texts (written by people who knew what it was to suffer - unlike the shrill evangelical brigade at the time who had a tendency to believe that everything would go swimmingly now they had Jesus on their side) and 3. so I wouldn't meet anyone I knew. I swerved if anyone so much as twitched in my direction. It was a great time in a way - I got the solace I was looking for, but I was intensely angry at God and couldn't address him without a torrent of expletives pouring out, and this time went on for quite a while. I think it was important to get out the intense pain and anger at God for what had happened. I still wasn't a practising christian though and had no intention of being - I was using God, really (and I think that's ok tbh; for a time, at least?). it was when I sought to challenge a friend's involvement in what I considered a christian cult that I started looking at the bible to gather some points to present to her. And while doing that I was smacked in the eye with something that stopped me in my tracks. The end result was that me and God were back on. I was very surprised!
As a result of that time, I am not afraid of suffering. I suppose if you stare it in the eye it loses its power. a person may choose suffering, on the very rare occasion; but, generally, we avoid it at all costs. But if you have no choice, and you learn to live with it somehow, you lose the fear of it, come to terms with it. I am not saying that I am blase about suffering but it doesn't fill me dread in the way it did - not just on my own behalf but on others'. I feel I have known that God is 'close to the broken-hearted'. What I suffered was, I suppose, a third world suffering (in that, despite my suffering, I had the tremendous comfort and solace of basic subsistence needs - which we can take for granted in the west), but what I suffered was nonetheless universal, a very human, and intense, suffering.
coming back to the OP (where are you OP!), I think it says somewhere in the lovely book that if you want faith, ask for it. It's not something you can do yourself imo. You can put yourself in line for it eg explore, open your mind, tip up, show willing; but you can't actually do it yourself: it's a gift. Freely available, as it happens.