Klauss
"Cargo doors do give a red light in the cockpit when they are not locked. Thatīs a very obvious light..."
Depending on the operator, the Door Indication System can be an MEL item.
In that case, the aircraft can be despatched with the system inop, provided that an external visual check of the locks is made before departure.
That typically involves a cherry-picker, torch and (if necessary) a means of cleaning the 8 Plexiglass viewports through which the latches can be checked. What could possibly go wrong?