Reminds me of the inline fuel filters on my old BMW 2002 (1973). Something like this:
https://www.pelicanparts.com/More_Info/13321277497.htm?pn=13-32-1-277-497-M45&SVSVSI=3892&DID=11589
I might order some for my ‘82 300D Turbo. Of course, I need to see if the diameter of the connector ends are compatible with pieces of the rubber flexible hose.