This is a long digression, sorry. Let's say you have a presidency and that among first choice votes, 40%+1 prefer L, 40%-1 prefer R, and 20% prefer C.

In a plurality system, would-be C voters have to choose between voting sincerely (knowing their candidate has no chance of winning, or to exert a plausible threat in the next election for candidates to take them seriously) and voting strategically (picking between R and L, which is closest to them). This creates a system where the closer of the two has every incentive to co-opt the votes as early as possible and everyone who donates money or time to try to affect the major candidates early. That's what we see now. In the US, most of the negotiation happens within parties. The Tea Party and Sanders movements were both things that acted as caucuses within an existing party instead of forming new parties, because of this incentive.

In a ranked-choice system, the C voters vote for C... and then either L or R. C gets eliminated, and L or R wins. So while the strategic versus sincere tradeoff for C voters is dismantled by the voting system, there's still a center of gravity pushing people into two camps (the L/C->L and the R/C->R camp).

Besides voting, this impacts organization, campaigning, issue messaging, donations, etc. Given that the election is winner take all and there are two camps, what infrastructure should resources pass through? And we've decided that for branding purposes, the answer is mostly stable, long-term professional parties. If you're extremely conservative, you'd rather your choice win the Republican primary than go it alone in an election for senate as an independent conservative. Going it alone does sometimes happen -- but in these cases there still tend to be two main camps for the winner take all election, like how Alaskan senate seats are recently I versus R instead of D versus R, but this normally only happens when there is dysfunction in the infrastructure that should have been one of the two camps.

So, now, take France, which has runoff voting for President. The first round of voting essentially functions as a primary to determine who represents the right and who the left. The institution makes the two surviving camps explicit for the second round of voting, but even in an instant runoff framework this camp structure always would have happened because there's only one president and you can't divide the presidency.

Canada is an interesting case in that it doesn't have a presidency. It has more than two parties. But within each district, there are typically just about two parties -- the country typically has around 2.7-3.5 political parties measure by ENP but the mean district typically has about 2.2 parties. I haven't run the numbers on the 2019 election, so I'm goin by memory. The two party pressure still exists, because electoral districts are winner take all, like the presidency, but it exists at a slightly different level of organization. Canadian parties often try to nationalize their elections (make a vote for your local Liberal a vote for Trudeau, or what have you) but conceptually the competitive dynamics are multiparty only at a national level and two party in most districts. Where they aren't, the third party almost always acts against its own interests as a spoiler, and so they should be. The pressure is powerful.

Thus Duverger's law is best formalized as: in any winner take all election, there is strong strategic pressure to reduce the number of parties competing. Where more parties emerge, it is often a transition state that will in equilibrium reduce down to 2 over time.

The best way to reduce the two camp effect is to reduce the number of things that are winner take all. An MMP or PR electoral system is best suited to ensure this at the voting stage. Even in these systems, the two camp effect often emerges during coalition formation (see: Netherlands; GL and PVV and VVD and Labor can all exist in parliament, but the ways in which they form coalitions are mostly left versus right depending on relative party sizes).

To fully get rid of it, you'd also have to figure out a way to divide the executive in parliament in a stickier way than coalitions do. Something like the Lebanese system (which is designed to ensure every ethnicity controls one major political role) could work. If you imagine a parliamentary country with PR and with a restriction that winning coalitions must rotate the prime minister by party every six months, that would be an interesting start. I am not aware of any countries that go this far.

My post is way too long. I suggest you read the short book "An Economic Theory of Democracy" by Anthony Downs. It is maybe 100 pages and has a wonderful quality of starting with very simple models and then relaxing assumptions until it approximates reality. It's the canonical political science reference to this and one of the main things that kicked off the sort of "median voter" approach to social choice, which as other commentors here mentioned is one of the main approaches to thinking about this problem.