Improving the quality of the filter_layers_on_thickness method of SoilLayout

When using the filter_layers_on_thickness method on a SoilLayout sometimes information gets lost. As an example I have attached a visualisation of a soil profile interpreted from a CPT file. As can be seen, there are quite a few thin clay layers in the original soil profile but all of them get lost when filtering the SoilLayout on a thickness of 0,2 m. If a user is not aware of this fact it can cause information to get lost which in this case are soft/weak soil layers resulting in the final soil profile being stronger than the original one which is not desired.

I was wondering if it is possible to improve this method so that a lot of thin layers together to not get filtered out completely. Is there someone who can help me with that?

Just for future reference, in the meantime @Rutger and I have spoken about this, and I explained to him how the current algorithm works. Based on that he ended up writing his own improved version of the filtering algorithm, which does the job very well!