The man’s plot was discovered when a cellmate and an undercover deputy got an audio recording of the scheme