Solution 1:

A quick search yields:

MEANING:

Having confidence in a specific outcome; being almost sure about something.

When a person makes a strong assumption, they may use popular idioms and phrases like this one to describe their feelings of near certainty.

ORIGIN:

Know your phrase

Speaking in a literal sense, would you really want to eat a hat? I wouldn't think so, considering they are made from materials such as cotton, linen, and leather; none of which sound particularly appetizing. Moreover, consuming a hat could be potentially dangerous, and it probably doesn't taste very good either.

Nobody really wants to eat their hat. That's why this expression is only said when a person is feeling extremely confident about something.

This phrase makes an early appearance in several newspapers from the 19th century, one of them being the Iowa South West from the city of Bedford, 1876:

"If you are not Joe Kirby," he said, I will eat my hat-I mean, of course-" "Come, this is trifling. I say that you mistook me for some one else. What makes you think me Joe Kirby?" "Because you are."

phrases.org.uk

The earliest example of the phrase that I can find in print is Thomas Brydges' Homer Travestie (A Burlesque Translation of Homer), 1797:

For though we tumble down the wall,
And fire their rotten boats and all,
I'll eat my hat, if Jove don't drop us,
Or play some queer rogue's trick to stop us.

A simple alternative of "to eat one's hat" is "to be very surprised".

Solution 2:

But why hat?

Why would the promise (or threat) to eat one's hat make an assertion and opinion all the more compelling? Well yes, eating a hat would be an awkward, difficult and highly unpleasant endeavor, but as the OP reminded us; why not a shirt, a jacket, pair of underpants or even a pair of socks?

I have one theory. Unfortunately, I am unable to find any concrete evidence to support it but despite this fact, I think my argument is solid.

To begin with it's a well-known fact that hats were de rigueur from the late 1700s until the second World War—everybody wore hats—irrespective of age, sex or social class. Photos and illustrations from the Victorian era clearly show that wearing hats was not simply a choice of fashion, it was an essential item of clothing. This was true in the United Kingdom, but also in the rest of Europe and the United States. Hat factories sprung up throughout the western world and when hatters began treating raw rabbit or beaver fur with mercury nitrate in order to produce a higher quality of felt, the continual exposure to the fumes and vapours of this toxic metal meant that their bodies became poisoned; resulting in symptoms such as trembling (known as "hatters' shakes"), loss of coordination, slurred speech, loosening of teeth, memory loss, depression, irritability, anxiety and other personality changes.

Mad hatter Disease

During the Victorian era the hatters' malaise became proverbial, as reflected in popular expressions like "mad as a hatter" and "the hatters' shakes".

The first description of symptoms of mercury poisoning among hatters appears to have been made in St Petersburg, Russia, in 1829. In the United States, a thorough occupational description of mercury poisoning among New Jersey hatters was published locally by Addison Freeman in 1860. Adolph Kussmaul's definitive clinical description of mercury poisoning published in 1861 contained only passing references to hatmakers, including a case originally reported in 1845 of a 15-year-old Parisian girl [...]. In Britain, the toxicologist Alfred Swaine Taylor reported the disease in a hatmaker in 1864.

Consequently, people were fully aware of the health hazards connected to hat making, and in making such a bold statement, I'll eat my hat, an element of gravitas (I could die!) was deliberately intended which today is lost.

Finally, in answer to the OP's second request as to whether there are alternatives to the idiom, eat one's hat, I would suggest the following:

  • I stake my reputation on (someone or something)

If you stake something such as your money or your reputation on the result of something, you risk your money or reputation on it

  • you bet your bottom dollar

based on the literal meaning of bottom dollar (your last bit of money, which you would not risk losing)