I would take a different approach to the issue. Have a system which ensures strong party discipline, coupled with the ability to switch parties, or easily start a new one.
With strong party discipline, the party as a whole decides on what they want to push for, electorally and in the legislature. People choose the party that they want to support because of that discipline, and know that all elected members will work to achieve that, if possible.
The other part is to make it easy to establish new parties, if the current ones don’t match what some people want.
For example, in the Canadian federal Parliament, there are currently 5 parties represented. The oldest of those, the Liberals, is younger than either the Republicans or Democrates in the US; dates back roughly to Confederation in 1867.
The next oldest is the New Democrats, founded in the mid-1960s; then the Greens, founded in 1983; the Bloc quebecois, founded in 1990; and the Conservative Party, founded in the early 2000s.
Notably, both the Bloc and the Conservatives resulted from the disintegration of the Progressive Conservatives; new parties quickly formed, to take a different approach than the old PC party. The Liberals also inherited a few from the new Conservative party.
That kind of shake-up in party structure makes it easy for members to switch parties, and for voters to switch allegiance. The members will vote the party whip, because they have joined the party because of the party platform (which they have a role in making), not because they’re being forced to vote against their consciences.