Text this: Analyzing the filamentation of MeV-range proton bunches in a laser-driven ion beamline and optimizing their peak intensity