The EU is investing billions to establish African states as its new border guards. It also supports dictatorships that close their borders in return.