German police say a 24-year-old Afghan citizen who had applied for asylum has been arrested after a car was driven into a union demonstration, injuring 28.