The idiom is 'to close the stable door after the horse has bolted'. This is used for saying that something has been done too late because the problem it should have prevented has already happened. For example, Improving security after a major theft would seem to be a bit like closing the stable door after the horse has bolted.
Note that 'bolt' here means 'to run in a sudden way, especially because your are frightened'. By coincidence, you could also say that the stable door is bolted, which means locked with a metal bar (a bolt) you slide across it.
As for the meaning of the cartoon, it refers to the fact that Germany (German Chancellor Angela Merkel is shown in riding gear), has reintroduced border controls to curb the overwhelming influx of migrants, in contrast to its earlier 'open-door' policy. The hoofprints on the ground are meant to suggest that the horses (i.e., migrants) have already bolted and are now running loose (to continue the equine metaphor) all over the EU (note the stars representing the EU flag).
It should be noted that The Telegraph is a right-wing paper, which explains the 'message' of the cartoon.