Is it obsolete to use this word? Where does it come from? I couldn't find the origin of this term.
Can I use the phrase "The machine conked out" or should I replace conked out with something else?
It's not obsolete but it is colloquial/slang, so it would be out of place in more formal writing. It's used in the UK and US, and, I believe, in Australia, New Zealand and India.
Your sentence "The machine conked out." is a good example of the phrase, but for more formal use replace conk out with something like broke down or stopped working.
The Online Etymology Dictionary suggests:
However, conking out predates World War I and seems to have been coined by British motorcyclists to describe problems they faced with single-gear motorbikes going uphill, and is probably onomatopoeiac.
Here's a 1911 snippet from Motorcycle Illustrated Volume 6 (Motorcycle Publishing Company):
Care must be taken with snippets in Google Books, as occasionally the date is wrong. However, the middle column confirms the year:
A few pages later an onomatopoeiac origin is suggested:
Finally, an article on British motorbike slang in The Washington Herald (Washington, D.C., July 09, 1916) shows its spread to the US:
For interest, here's the whole article:
We don't know the origin. The OED says it is 'of obscure origin'. It also says that it is colloquial, so you should avoid it in formal contexts.
The word conk is slang for nose.
From Oxford English Dictionary (OED):
But conked also means to punch on the nose. From OED:
I think it’s therefore fair to assume that conked out originates from someone being punched on the nose and knocked out.
But that is purely speculative.
I can vouch that, at least in the USA, it is very common to refer to a machine (eg: automobile engine) that stops working unexpectedly to have "conked out". If you use it properly in that sense, you will most likely be understood just fine.