Any ideas why this is happening?
Some of the contourlines intersect each other at resolution 23 - I especially used reduce-point-density=1.0 to try to stop it.

java -jar -Xmx47000M /home/contourlines/mkgmap.jar --keep-going --dem-poly=/home/contourlines/bounds/bayern.poly --series-name=openmtbmap-cntrs-DBY-23-Apr-2021 --dem=/home/contourlines/hgt/VIEW1/,/home/contourlines/hgt/SRTM1v3.0,/home/contourlines/hgt/VIEW3/,/home/contourlines/hgt/SRTM3v3.0/ --dem-dists=5520 --max-jobs=7 --reduce-point-density=1 --transparent --style-file=srtm24 --latin1 95260000.osm.pbf  

Is there any way to improve this?

Look at the screenshots - the small one is resolution 23, the big one 24. If using 10m interval contourlines this is pretty obviously not ideal. Resolution 24 could be nicer - but I guess this is more a problem of phyghtmap (while groundtruth can produce higher quality), but resolution 23 really becomes confusing vs 24...:
Simplification_23.PNG
Oiginal_24.PNG

If pictures don't show 
https://openmtbmap.org/23.PNG
https://openmtbmap.org/24.PNG
--
Felix Hartman - Openmtbmap.org & VeloMap.org