Polygraphs are not admissable in court. Not sure this is a wise investment of money. Better to hire a lawyer to help beat the citation.
This is a mess. You cursing and the owner pulling a gun. I think we can safely say this employment relationship is done. However, the pulling of a gun sounds criminal to me. It is also assault and could allow a civil action on your part. Go to the police. File a report. Get another job.