Generally speaking, sensor designers make essentially the same sensor in multiple sizes. For example, the Sony IMX411, IMX461, IMX455, and IMX571 are all basically the same sensor, just in 48x60mm, 33x44mm, 24x36mm, and APS-C sizes. Same pixel pitch, same bit depth, similar read noise and full well capacity, etc. As long as the latest/greatest sensors are made in all the various sizes, larger formats will always have an advantage in terms of image quality. Large size medium format > mini medium format > full frame > APS-C > 4/3" > 1". That can't and want change.
It's up to the photographer to find the right system. That means image quality that is sufficient for purpose, lens and accessory availability that meets your needs, camera performance that lets you get the shot you want, and a price that is affordable for you. For any given photographer, any of the above systems might be the "best". If you shoot sports and action, for example, there is no way you should choose a medium format camera. Nothing wrong with the systems, but they aren't remotely as "fast" as full frame or smaller systems. If you are a professional landscape photographer, a 1" sensor isn't going to be the right choice. If you shoot birds or wildlife, there's a good chance APS-C or full frame will offer you the right balance, not because of the format but because of the lenses and field of view you're going to want.
There is no chance--zero--that medium format will lose its advantage in image quality as long as sensor makers keep the technology the same across sizes. However, it is possible that full frame (or APS-C) will become "good enough" in terms of image quality that even demanding landscape and product photographers no longer need or want larger sensors, and it is equally possible that the market for medium format contracts so much that chip manufacturers STOP making the best chips in those sizes. Neither has happened yet, but either could. The Fujifilm medium format system seems to have reasonably strong support, but I suspect Phase and Hasselblad are struggling with their 48x60mm systems. Your crystal ball is as good as mine, I'm sure.