Airports are full of luggage and I seriously doubt yours will stand out over anyone else’s. I’d have no concerns about crime at a large airport as MAD, nor would I think about it making the next flight. It’s an automated system. What I would be concerned about is not being able to pack two sets of fresh cloths in my carry on; one that you should always have and one for the day that you are in Madrid. So I would only check to MAD. Are you on one ticket?