I've lived and worked and paid taxes and pension contributions etc. in 2 EU countries apart from the UK.
As far as I can tell:
a) In terms of "qualifying contributions" that might be eligible for social insurance and also pension contributions this money appears to be just well, lost into the black hole. Or if it is recoverable, the expense of doing so makes it a very questionable activity.
b) At least 2 of the countries (UK and one other) lost paperwork filed about my working status and this lead to the tax offices in the respective countries harassing me and treating me like a criminal.
I shudder to think how things might be if I had cross-EU family issues as well.
Family problems, oh dear. Disagreement about custody of the children? There is every chance that will finish in a real horror show.