That being said, it does not take a lot of signatures to get on a ballot as a candidate outside the parties in Denmark (a few hundreds, I believe), though only two candidates have successfully managed to get elected that way. Conversely, Denmark has a high threshold for political parties (requiring signatures amounting to 1% of the vote of the last election, so usually around 21k), but the threshold to get into parliament is only 2% (which I believe is one of the lowest amongst countries that uses similar proportional representative systems).
Returning to the towing the line (or rather lack thereof), the Danish parliament have a lot of independent MPs in parliament, because a lot find reason to quit their party after getting elected. Wikipedia has a fine table of MPs who has changed colours since the last election in November 2022:
https://en.wikipedia.org/wiki/List_of_members_of_the_Folketi...