So true it hurts. All of your comment.
That's why I am thinking actively about starting my own small business lately. Or simply refuse to do web development at all and go into data science / A.I. / pattern extraction areas.
It seems like either of those would be excruciatingly hard to transition to (work inertia can be a blessing and a curse) but I want to do either -- or both -- because web development is in my eyes in its worst decline ever. I don't buy the optimistic BS from inexperienced JS devs or the promises of new tech. People still have to use user agent sniffing for their website to work best. Just lol.
Wherever possible, I make it clear that this cruft comes at a cost, but I cannot recall a single client being swayed by those arguments. In the case of overlap between trackers (Analytics, Facebook, etc), from the perspective of the client, they solve their "problem" in a quick request. Either it appeases the marketing company or it gives them that little extra feature they think they need but will never use.
Increasingly, it can be miserable developing for anything other than my own projects because of how much time is spent implementing bad ideas requested by other people.