Writing epilogues is usually one of the more fun parts to write of a story since you can be satisfied in the knowledge that your vision has at last been completed.
In general, epilogues should somewhat represent the results of what the protagonist accomplished. Some divergence of that is okay, after all what your character might have thought was a good thing during the actual story, didn’t work out so great after all in the long run.
I do agree that the scope of the epilogue should tend to match the scope of the story, however, you can even get around that depending on how much is being written overall and what exactly is going on.
For example in Suzy’s Strange Saga, it takes place in the course of a week, but each day is broken down into several passages, choices and A LOT goes on each day causing a lot of change to the protagonist’s life. It made sense to take the multiple epilogues a decade or so in the future to see how much she had changed and was getting along in the new world.
Meanwhile in Eternal, it’s a whole “womb to the tomb” story. So the epilogues in that only applied when the protagonist made a big enough impact in the world to be remembered for generations and by history.
I’ve always seen epilogues as sort of “winning” endings so I see them as the “final” wrap up of lasting accomplishments of the protagonists. Other endings might not all be bad though. Hell, some of the “lesser” endings I’ve written even with stories with epilogues I’ve actually liked better.
Epilogues can work no matter what the scope of the story is; however they typically work better if that story is still self-contained. If you’re planning on a sequel, you get the problem of which ending is the “true one?”
Of course as the writer, you can handle this several ways. The easiest one being you just pick the one you like the best and works for you as far as writing the next story is concerned.
One thing I don’t like are cliff hangers, though you can still have “weak” cliff hangers which work if you want to leave things open for a sequel. Like perhaps an indication that potential trouble/struggles/etc. still loom out there, but for the story purposes all the immediate threats/problems have been solved or taken care of.