I'll let the experts weigh in on whether there is a specialty replacement material for this purpose. Otherwise, your approach sounds like how I would try it.
If you have gaps in the foam, I'm thinking that some of that home insulating foam might work for you - goes under the name of Great Stuff here in the states. It sticks like crazy to anything and expands when you apply it. I'd apply it to the gaps and let it overexpand, then let it dry completely. After that, cut it with a knife and try to shave it into shape. It's not quite as dense as the foam on the dash, so there may be another product that is better, but that's what comes to mind.
Here's an article on using spray on plastic truck bed liner to get like-new results. Might work for you.