Short answer is yes, but that is not a hard yes all the time.
I have a 5-year-old child who still occasionally begs to ride in the stroller when we go out. Usually I just say no, even if his younger brother is getting a ride. Sometimes I allow it.
If I allow my 5-year-old to ride in the stroller (we have a two-seat stroller), it is usually if one of two conditions are met, either:
We are going for a very long walk. The walk is long enough that I think he might be complaining harshly and making my time very difficult long before the walk is done.
He has a lot of energy that day and is a bit wild. Even then, he is told to that he can ride in the stroller later, and the timing is used strategically. For example, I tell him that he must walk to the destination first, then I allow him to get strapped in when we arrive. Conveniently for me, this keeps him contained while we are at the destination. I have done this when I needed to go to the bank or when something else needed enough of my attention that I could not give enough attention to my son. After, I let him ride part way back home and make him exit the stroller to walk the rest of the way back.
Very rarely, I have let even his older sister, age 9, ride in the stroller. This is quite rare and is only done out of necessity. One time was when she hurt her leg while we were out, so I let her ride so that she did not need to walk on her hurt leg. Another time was when we went for a very, very long walk during which the breaks were not enough to keep the children going; we had many stops around town, even I was achy and wincing long before the end, so I let the older children take turns riding in the stroller. Don't subject your children to more, or even as much, as you can bare.
In general, however, I try to keep children older than toddlers out of the stroller. The older they are, the more likely the answer is just flat-out "No," with the obvious exceptions of necessity - like a hurt leg.
A lot of it depends on the child. Our 5-year-old is slightly delayed mentally and acts younger, so sometimes we accidentally fall into the habit of treating him like he is 3 or 4. However, his younger brother is 2, and even the 2-year-old is usually told "no" to the stroller and is made to walk.
Walking is very good for your health and your child's health. Pushing them past their comfort will strengthen them both mentally and physically. Of course, do not push them to exhaustion; there can be too much of a good thing.