So Nintendo's failings are third party support (how much of that is engines I don't know. I don't think they are as censor happy as they once were, and don't have the market share to command much like it was back on the NES/SNES), network code, stagnation in their first party efforts (possibly even being at the point of the everything and the kitchen sink approach making things bland vs prior efforts), emulation maybe (it is not good but how big an issue that is varies).
Buying things in can probably only solve the network code issue.
People saying buy Atlus (which are a division of Sega these days) then ignoring that Atlus has not been Atlus for a while now (that which made them beloved back in the day they have not really done) so would probably be better to look at one of the other "we bring somewhat niche Japanese games over" companies like NIS or Idea Factory/Compile Heart. That said the underlying idea is great -- set up almost a loss making effort (if you are otherwise burning billions that will amount to nothing in the long run) to translate basically everything they can find, possibly including ROM hacking old Japanese games and vice versa. Peak Atlus had more genuine good will from the gaming masses than any other company I can really think of.
I don't know how many additional consoles it would sell but the attach rate would go through the roof, and after the Wii they are probably a bit sensitive about that one.
I personally think the money they spend on acquiring a new company should be spent on actually recruiting more coders or form an entirely new internal development team to try and see if they can revive some of their older IPs or inject fresh ideas into an existing property. Nintendo buying Sega would wouldn't instantly mean sequels to Dreamcast titles the next day if they don't have the resources to do so.
Acquiring a new company can be a cheaper means of doing that. New coders are available but they are desired by everything from tech for tech's sake, financial firms, insurance companies, local councils and everything in between.
Trying to assemble that piecemeal, never mind having it such that they all reasonably get along, can be quite the time consuming and expensive operation.
There's no need for Nintendo to buy anyone... but it would be good if they owned significantly more of Gamefreak. If GF was a complete first-party dev (instead of those pseudo-first-party shenanigans that are going on), they might eventually polish their games to the point where there's not much room for criticism. Looking at you, Arceus.
Good luck there. Merchandise is the biggest draw there by... several times. As long as the games keep it vaguely fresh in the minds of the kids (
https://moneyinc.com/pokemon-franchise/ ).