score:9
You are overthinking this.
The most reasonable interpretation of the CDC rules is that you don't need to retest unless you do an intentional stopover or have a massive delay.
There is no requirement to book the flight with the "shortest possible layover".
If you want to be absolutely safe just test less than 72 hours before the last leg to the US departs. The "3 day" rule is pretty generous and most countries can turn a PCR test is in 24 hours or less.