The best way to compare is to use BLS figures.
The median salary of an electrician in the USA is $62k. For a software developer, the median is $130k.
A top 10% electrician earns $110k. A top 10% software developer earns $210k.
In fact, even developers in the bottom 10% of software development out earn a median electrician.