I tried to reduce my MWE to some minimum but this is nevertheless quite large :-/
\documentclass[a4paper,11pt,naustrian]{article}
\usepackage[margin=2.5cm, showframe]{geometry}
\usepackage[tracking=true,factor=1100,stretch=10,shrink=10,final]{microtype}
\usepackage[table]{xcolor} % for highlighting AND background images-color!!!
\usepackage{setspace}
\onehalfspacing
\usepackage{xltabular}
\usepackage{booktabs}
\usepackage{caption} % config is done for table and image separately
\usepackage{needspace}
\usepackage{placeins} %insert some barriers for floats (e.g. figure)
\usepackage{kantlipsum}
\begin{document}
\begin{xltabular}{\textwidth}{| X X X X X X X X X X X}
\midrule[131564sp]
&2020& 2021& 2020& 2021& 2020& 2021& 2020& 2021& {2020}& {2021}\\
\midrule
&\multicolumn{2}{ c }{abc 1 }
&\multicolumn{2}{ c }{abc 2 }
&\multicolumn{2}{ c }{abc 3 }
&\multicolumn{2}{ c }{abc 4 }
&\multicolumn{2}{ c }{{abc 5} }\\
\midrule
\endhead
Provinz&212&62&195&101&212&62&195&101&{212}&{62}\\
\midrule
Provinz&5&5&8&10&5&5&8&10&{5}&{5}\\
\midrule
Provinz&1&2&0&3&1&2&0&3&{1}&{2}\\
\midrule
Provinz&1&1&1&5&1&1&1&5&{1}&{1}\\
\midrule
Provinz&3&1&1&1&3&1&1&1&{3}&{1}\\
\midrule
Provinz&15&1&5&7&15&1&5&7&{15}&{1}\\
\midrule
Insgesamt&
2&3& 1&1&2&3&1&1&2&3\\
\midrule\end{xltabular}
\needspace{3\baselineskip}
\FloatBarrier
\section{test bilder}
\begin{xltabular}{\textwidth}{!{\vrule width 131564sp} X X X X}
\midrule[131564sp]
& & & \ \midrule
& & & \ \midrule
& & & \ \midrule
\end{xltabular}
\begin{figure}[!htbp]
\rule{10cm}{5cm}
\caption{Image1}
\rule{11cm}{1cm}
\end{figure}
\FloatBarrier
\begin{figure}[!htbp]
\caption{Nextcloud}
\end{figure}
%\newpage
\FloatBarrier
\begin{figure}[!htbp]
\rule{11cm}{4cm}
\caption{Nextcloud Daten}
\end{figure}
\FloatBarrier
\begin{figure}[!htbp]
\rule{13cm}{4cm}
\caption{Zoneneinteilung ABC}
\end{figure}
\FloatBarrier
\section{MyTest}
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in
\begin{xltabular}{\textwidth}{!{\vrule width 131564sp} X X X X X X X}
\midrule[131564sp]
Vorfälle& 01/21& 02/22& 03/22& 04/22& 05/22& 06/22\
\midrule
10& x& & & & & \ \midrule
20& & x& & & & \ \midrule
30& & & x& x& & \ \midrule
40& & & x& & & \ \midrule
50& & & & & x& xx\ \midrule
60& & & & & & \ \midrule
\end{xltabular}
\kant
\end{document}
It seems like I have a strange combination of figure and tables which causes the last table in a strange calculation of the of the whole page. It finally ends with a
Overfull \vbox (256.12231pt too high) has occurred while \output is active []
which will look like
Introducing a command like \newpage fixes the issue. Since I'm more or less generating the TeX code automatically I need a solution which calculates the space at the end properly.
Any hints what I can to do to achieve a better result?
NOTE: If required I can send a complete package of all the files for this request - since they include some graphics which require a specific size :-/
Running lualatex 1.13.2
NOTE: Update:
- Replacing the images with a ruler
- Using
xltabularsince I don't know in advance where the page ends and when not. This should be done automatically by TeX (at least I would expect so).

xltabularand when not. If you do it manually I would agree. If you do automatically its hard to guess when or when not to use each of them. – LeO Oct 07 '21 at 13:50\bgroup{}\bfseries{}\egroup{}?? this does nothing at all. – David Carlisle Oct 07 '21 at 14:03\begin{figure}[!htbp] \rule{10cm}{5cm} \caption{Image1} \rule{11cm}{1cm} \end{figure} \FloatBarrier \begin{figure}[!htbp] \caption{Nextcloud} \end{figure}. – Zarko Oct 07 '21 at 16:10naustrian? – Zarko Oct 07 '21 at 20:02longtableV4.16 fixes the issue. I added a fix thx to Ulrike. Unfortunately this fix blocks the efforts done in V4.16. Additionally I found it quite hard to figure out which version oflongtableis included in the currenttexlivepackage. Perhaps that's another q. Anyway I'll close this ticket in the next days. – LeO Oct 08 '21 at 09:02