I’ve been able to clear plane to train in 20 minutes, including automated passport control. It’s worth the risk so long as you can take a later regional train at no cost. If using one of the non-EU lines, try to sit near the front of the aircraft.
Just look at train times on bahn.de ahead of time. Know what train options you have and the last possible train you can take. As others mention frequency is an issue.
Working in your favor is the fact that DB has poor on-time performance and could easily be late as well.