While the earliest examples of "smoke tests" in Google Books are plumbing-related (with some other assorted usages like smoke tests that determine how air circulates in machines), there are plenty of examples that show "smoke test" being used to refer to a method of finding electrical faults via circuits spectacularly failing (i.e. burning out and potentially producing smoke).
From The Electrical Journal (1910)
The author is aware that some station engineers
believe in allowing earth leakages to develop to a more pronounced
stage before adopting remedial measures, and one engineer at least
has indeed advocated the "smoke"
test method of localising faults
but the author believes those who have any regard for the prestige
of their undertaking will agree with him that, as the primary consideration is reliablity of supply, incipient mains faults should not be
peritted to develop to such an extent as will interfere with the supply even to a single consumer.
[...] He thought the smoke test, burning out of the fault, was rather rough on the consumer.
Transactions (?1941):
In the
"pioneer" days
the operator simply watched
the machine
and when
it began to smoke,
he disconnected it from the supply or decreased its load.
Even in relatively recent years the “smoke test” was used for determining the capacity of a machine.
For instance, Mr. Lamme in the year 1892 used
the smoke test for the purpose of determining the capacity of his rotary converter [...]
Frequency Response (?1956):
The final test is to put the servo together and give it what the electrical engineering profession calls the "smoke test.” That is, the power is turned on and the servo operated as a system for the first time
And Hearings (1963)
In a program as vast as Apollo there are many opportunities for
mistakes.
As Mr. Holmes said, a contractor or even a center can
design an interface with a plug that contains seven wires; if you are
not careful, another contractor who may be working for another center may design a mate to that plug with eight wires. Or, what's even more subtle, when they connect the wires into the back of the
plug you may wind up with right wires going to the wrong terminals,
and when these plugs are assembled you wind up doing what we call a
smoke test the first time you hook the things together, electrical connections being such that things might burn out.
Because "smoke test" first showed up in a plumbing context, can we conclude that is the origin of the expression? Not really. The expression used in electrical engineering, however, is much closer in meaning to the one in software development, plus the fields were very closely related:
The electronic digital stored-program computer marks the convergence of two essentially independent lines of development tracing back to the early nineteenth-century, namely the design of mechanical calculators capable of automatic operation and the development of mathematical logic. In outline, at least, those stories are reasonably well known and need no repetition here. Viewing them as convergent rather than coincident emphasizes that the computer emerged as the joint product of electrical engineering and theoretical mathematics and was shared by those two groups of practitioners, whose expertise intersected in the machine and overlapped on the instruction set. — The Roots of Software Engineering