If you are using plain TeX then you can try this:
\input opmac
\let\fnoteori=\fnote
\def\fnote#1{\fnoteori{%
\expandafter\ifx\csname fn:#1\endcsname\relax Footnote not declared yet.%
\else \csname fn:#1\endcsname\fi}}
\def\fnotedef#1#2{\toks0={#2}\openref\immediate\wref\sdef{{fn:#1}{\the\toks0}}}
Something pretty complicated\fnote{ref:1}
% at the end of the document (or somewhere else):
\fnotedef{ref:1}{This complicated thing needs details.}
\bye
If you are using different TeX macro (for example LaTeX) then you can find only the inspiration here. The \fnotedef macro saves the information to the working file (aux, ref etc.) in the format:
\sdef{fn:ref:1}{text}
When the document is processed again, then this file is read and \sdef macro defines \fn:ref:1 as text. So, the \fnote macro can execute the original \fnote where the \fn:ref:1 is expanded.