If you have no concern over undefined \references, you can just capture the contents of every figure and table using environ:
\documentclass{report}
\usepackage{environ}
\RenewEnviron{figure}{}% Gobble figure environment
\RenewEnviron{table}{}% Gobble table environment
\usepackage{lipsum}
\begin{document}
\chapter{A chapter}
\lipsum
\begin{table}
\caption{This is a table}\label{tab:table}
\end{table}
\begin{figure}
\caption{This is a figure}\label{fig:figure}
\end{figure}
\lipsum
\end{document}
This should work even if you have a custom class as they typically use the same name for floats.
If you wish to retain \referencing capabilities, you could capture the figures and tables in the same way, but process them to see if they have a \label within them. Processing here means you capture the \label by storing the entire figure/table inside a box (that is never set).
\documentclass{report}
\usepackage{environ,etoolbox}
\newsavebox{\figtabsavebox}
\newcommand{\savelabel}[1]{\xdef\savedlabel{#1}}
\RenewEnviron{figure}{%
\patchcmd{\BODY}
{\label}
{\savelabel}
{% \label found
\renewcommand{\caption}[2][]{}% Make \caption[.]{..} a no-op (assume it doesn't contain \label)
\refstepcounter{figure}% Step figure counter
\savebox{\figtabsavebox}{\BODY}% "Execute" \BODY; also stores \label
\label{\savedlabel}% \label figure
}
{% No \label found
\stepcounter{figure}% Step figure counter
}%
\ignorespaces
}
\RenewEnviron{table}{%
\patchcmd{\BODY}
{\label}
{\savelabel}
{% \label found
\renewcommand{\caption}[2][]{}% Make \caption[.]{..} a no-op (assume it doesn't contain \label)
\refstepcounter{table}% Step figure counter
\savebox{\figtabsavebox}{\BODY}% "Execute" \BODY; also stores \label
\label{\savedlabel}% \label figure
}
{% No \label found
\stepcounter{table}% Step figure counter
}%
\ignorespaces
}
\usepackage{lipsum}
\begin{document}
\chapter{A chapter}
\lipsum{}
See Figure~\ref{fig:another_figure}.
\begin{figure}
\caption{A figure}
\end{figure}
\begin{figure}
\caption{Another figure}
\label{fig:another_figure}
\end{figure}
\lipsum
\end{document}
The above assumes that you have a single \label per figure/table float (although, in general, one could have multiple) and that the \label is not contained within the \caption.
\references? – Werner Jan 13 '21 at 21:10