UB is not academic: signed-overflow assumptions let compilers delete security checks, and real CVEs (like the Linux kernel's famous null-check elision) came from optimizers exploiting exactly what you are exploring. This is why the kernel builds with -fno-strict-aliasing and why sanitizers (UBSan) run in every serious CI pipeline.