A Nigerian lawyer has detailed how a man was wrongly sentenced to death for buying a second hand generator.