i don’t see gen 5 as canon due to so many things
1: twilight (and discord) will learn how to cope with a death of a friend and support each other and learn that just because a friend died doesn’t mean their gone forever, they still live in your heart and in the memories you have and knowing that they would not want to see you sad, twilight and discord would have learned this and discord would help twilight with friendship stuff or with royal stuff since he would have learned from those years with his friends
2: if twilight retired she won’t let Equestria fall to ruin and even if she gave up immortality, the next rulers would follow her lessons that have been passed down so new princesses would know what to do
3: ponies are not that stupid they would know better that their friends would not do anything bad even if they are from another race they will learn that
gen 5 is dumb and it is non-canon, not just because i or maybe even some fans say so but is just due to logic and reality when it comes to Equestria, and for people in real life living in peace for many centuries that something like gen 5 should not happen is possible, is just people need to take an effort to keep it that way, be educated and use common sense in order for something like gen 4 equestria to happen
gen 5 is a fake future made by dumb people who just want to destroy what came before, the art is not as good and the concept is downright AWFUL, and Equestria will be the same Equestria that gen 4 left it as for many centuries to come no matter what happens