Another option is to treat the piece as a cadenza. Just know that you will need to manually insert \bar "" in places to permit line breaks.
Or use barAlways and defaultBarType: \version "2.22" \layout { \cadenzaOn \set Timing.barAlways = ##t \set Timing.defaultBarType = "" } \relative { \repeat unfold 20 { c'4 d e f g } \repeat volta 2 { c d e } \repeat unfold 20 { c4 d e f g } \bar "|." } Lukas