On the oil leaks I would recommend a proper diagnoses before you spend a lot of money on front and rear crank seals. Oil leaks always settle near the bottom of the engine and especially the rear because of gravity and the wind as you drive down the road. So don't let a mechanic with just a quick look sell you on a big expensive job. I recommend fixing the leaks but understand if they are barely leaking but you have to deal with a rigid inspection. As far as the foam I would just make sure it is not very flammable . I know the possibility is remote but if it ever went up in flames you would never forgive yourself. By your description I am not following what you did with your frame. I am usually not a big proponent of snake oil in a can type products but in the past have used a couple with good results. I am not sure if this is available to you in Germany but I had good luck with this in both stopping engine oil and power steering rack leaks with no long term ill effects It's called at205 reseal. Here are some videos about it https://www.bing.com/videos/search?q=at+205+reseal&qpvt=at+205+reseal&FORM=VDRE Good luck with whatever you do as I know the stress of state inspections all to well.