The OED tells us that originally bugger came from the Latin word Bulgarus meaning Bulgarian. It became a word of contempt because Bulgarians were considered a particularly heinous example of heretics. The word passed into French to become bougre and thence into English as bugger, meaning heretic.
Apparently heretics were suspected of all sorts of nasty habits. including unlawful sexual practices, so the word bugger ( or buggery ) came to mean the practice of anal intercourse. It had ( may still have ) that meaning in the NSW criminal law.
I realise that the word bugger now carries the connotation of contempt or annoyance or frustration.
You mob can write what you like, but I would rather not use it in my poems.

