Hi.
The little black boxes you mention.
Do you refer to the multi-plugs in the loom that originally were sited under the left fairing infill panel?
All power feeds to the clocks/lights go through these plugs, a known corrosion area.
I'd recommend a continuity test across these plugs with a multi-meter, just make sure battery is disconnected first.
Long winded job to unpick each connector & clean out internal corrosion, plus you'll need certain cleaning tools to achieve a proper clean.
I speak from personal experience, mine was in a right state.
Another option is to either solder a jumper wire across the offending connection or worse case scenario do the whole plug & cut it out.
I'm far too OCD for that ... LoL.. so i spent untold hrs going through the whole loom cleaning every connection & soaking in ACF50, bikes electrics are now mint as a result.
Also another non start issue I've come across is the starter push button, I completely pulled my switch gear apart to clean all internals with a scotch-brite pad.... Mine just stopped cranking for no reason, poor connection within switch, just glad it happened at home & not out on a ride.
Hope this helps matey?