When the example environment is created, LaTeX creates the macros \example and \endexample. These are used internally at the beginning and end of the environment, and their definitions can be copied using the \let command. Then, if the definitions are overwritten, we can use \let again to restore them from the copies. The following code does this with the itemize environment, but you should be able to adapt it to your own case.
\documentclass{article}
\let\olditemize\itemize %Store old itemize environment
\let\oldenditemize\enditemize
\renewenvironment{itemize}{}{} %Destroy itemize environment
\let\itemize\olditemize %Restore old itemize environment
\let\enditemize\oldenditemize
\begin{document}
\begin{itemize}
\item abc
\end{itemize}
\end{document}
\let). – TeXnician Jun 27 '17 at 17:39