Yes, a thousand times yes. I received an inheritance in my teens, about 15ish years ago. My mother plunked the money into 2 blue chip stocks (probably should have diversified, but hey) and did nothing with it for the past 15 years. In addition to producing thousands a year in dividends, their market value collectively is over 3 times the book value (and, each has split in the 15 years; one has done much better than the other).
If my mother had opted to use the dividend re-investing program, the market value would be bonkers as the stocks have steadily risen over the years, with some dips.
The money was a very good sum for the time, and thanks to her one investing decision, PLUS TIME, it has (slowly, over 1.5 decades) turned into a windfall. I continue to do basically nothing with it (though sold 1/5th of one stock holding recently; it has since climbed $10, harrumph) except funnel the dividends to other investments. Eventually I will have to make some decisions as I diversify my overall portfolio (these two stocks disproportionately represent one industry sector because they’ve risen so much in years).
As someone else has mentioned, it has also given me a keen interest in investing (and a clear example of the power of time and money), and that is invaluable.