I think the main reason gamefreak stopped trying as hard, at least their leadership did is because they went with a more mobile game style format (insert masuda's oras interview about how "kids prefer to play games on their phone"). They started to make the games either less difficult wise like gen 6 as the older ones or packed them with less post game content and more handholding like gen 7.
This became especially apparent when sword and shield released, which also unintentionally caused the player-base to be more critical of the 3ds era, as all the major videos that criticize XY for example were made after SwSh released. Before SwSh most critizisms towards gen 6 and gen 7 weren't as prevalent and i'd aruge gens 6 and 7 had their peak in reception at their respective launches. Back when XY and ORAS came out, I remember people saying that gen 6 was better then gen 5 or any of the previous gens aside from maybe gen 4. Which might sound insane in retrospects, but the reception was super positive, probably because people assumed there would be a pokemon Z.
I also think gamefreak is trying to emulate what shooter games like COD does and have multiplayer replace the lack of content elsewhere. This could be why obtaining competitive ready pokemon has became so easy (still a good thing tho, as to not force comp players to play pokemon full time).
I actually don't think GF stopped trying because of gen 5's reception, since apparently gen 5's reception was mostly positive in japan. Most of the people who produce japanese media only care about what the japanese audience thinks, even if the product performs better outside of japan. Also I don't think lack of sales played a factor either and i'd argue that gen 5 sold really well despite being released at the end of the DS' lifecycle. BW1 sold about 15 million which is about as much as ruby and sapphire and X and Y did, both selling about 16 million. A game on a "dead" platform selling about as much as launch titles is still pretty impresive, and black 2 white 2 actually sold BETTER than platinum or emerald. B2W2 sold about 8 million while platinum and emerald both sold about 7 million.
it's just that not enough people higher up did. Hence why HGSS was packed to brim with content, then two generations later when Gamefreak truly gave up we got ORAS.
Honestly ORAS is the game with the most missed potential in the entire series. If it added emerald content like better gym leader teams, gym leader rematches, and the battle frontier or at the very least more battle facilities like what b2w2 does It could have been a top 5 pokemon game material. ORAS, unlike BDSP, included tons of new additions like new character designs, soring, the dex nav, giving access to cross-gen evos and a lot of other things to make up for no emerald content, but they should have added those things alongside emerald content. I personally still consider ORAS to be a great game despite it's flaws. I also consider it the best 3d pokemon game and the last truly great pokemon game (which is kinda sad since it came out a decade ago). It's just missing that one thing to make it even better to make it on pair with games like HGSS or B2W2.