A former gun shop owner who spent three decades in the industry has fallen from grace after "complacency towards the twilight of his career" led to possession of prohibited guns, a judge has said.