There would inevitably be a grey area. If I do some work for a friend, and they give me some money to show their thanks, am I trading? What if I do such work for a friend of a friend?
I think the grey area would only be in relation to 'proof'. If person A undertakes electrical work for person B and person A then receives a payment from person B that they would not have received had they not done the work, then it is clear that they were 'paid for the work'. It might be difficult to 'prove' why the payment had been made (even 'between friends), but I imagine that a Court/jury might well take a 'common sense' view of the situation!
In any event, if someone were successfully trading as an electrician without the required 'registration', one can but presume that the majority of his/her customers would usually be strangers, rather than friends (or 'friends of friends'). Furthermore, as BAS has sort-of implied, unless they were concealing all of their income (for electrical work) from HMRC (and not issuing any invoices/receipts/whatever), there would be documentary evidence of their 'trading'.