I don't remember exactly what I read that convinced me using the user agent string to send different JS or CSS, was not the way to go.
Searching for supporting things just now, I found some thing that seem similar:
https://stackoverflow.com/questions/1294586/browser-detectio...
I do think in special cases you should use the user agent to send proper code, but most businesses probably don't need this today.
With https://caniuse.com/ and a good knowledge of the shape of your traffic, it no longer seems critical for .05% of users some how on IE 6 still that visit your site to have all the eye candy.
Now if you're a government site I think you should be taking the time to ensure as many people as possible can access your site bug free, but that could mean just make sure it is dead simple. If you're a large business where .05% of traffic is a few million $ of lost revenue, yeah go a head hire those engineers.
For the rest of us just let the eye candy fail, get the site to work and forget about it.