Sometimes it is just good to know that linux-life can be as easy as imagined, in this case by using SoX (Sound eXchange):
sox infile.flac outfile.flac repeat 32
this even works with different file formats like:
sox infile.flac outfile.mp3 repeat 32
would loop into a 128 kbps MP3
other bit rates can be set using the option:
-C|--compression FACTOR Compression factor for output format
getting an 320 kbps MP3 would be obtained with this command:
sox infile.flac -C 320 outfile.mp3 repeat 32
and finally a simple gapless playback from the command line with mpv:
mpv --loop-file infile.flac
or the same even simpler:
mpv --loop infile.flac