How to automatically calculate the width of a multicolumn in a table based on the combined widths of the columns that are merged
This is a proof of principle and all the conceptional work has been done by David Carlisle in this answer. You need to run twice. I am sure some TeX Guru can write a nicer code, but this shows that it is doable.
\documentclass{article}
\usepackage{array}
\usepackage{lipsum}
\newlength{\cwidth}
\makeatletter% https://tex.stackexchange.com/a/152842/121799
\protected\def\z#1{\pdfsavepos\write\@auxout{\gdef\string\tpos#1{\the\pdflastxpos}}}%
\def\foo#1#2{\ifcsname tpos#1\endcsname\the\dimexpr\csname tpos#2\endcsname sp -\dimexpr\csname tpos#1\endcsname sp\relax\fi}
\makeatother
\begin{document}
\edef\numA{\foo{a}{c}}
\ifx\numA\empty
\typeout{rerun}
\else
\cwidth=\numA
\advance\cwidth by-2\tabcolsep
\fi
\begin{tabular}{|!{\z{a}}l!{\z{b}}l!{\z{c}}|}
some text & some more text \\
text & a significantly longer line of text\\
\hline
\multicolumn{2}{|p{\cwidth}|}{\lipsum[1]}\\
\end{tabular}
\end{document}