No. The API is correctly named, but I can see how it could be misleading (and concerning!)
That API allows websites to programmatically go somewhere in your history. It can go forward, back, or to a specific point in your history, but it can’t see what that history is, it can only go back 3 pages back or forward 2 pages for example. It doesn’t actually know the history, it just navigates to those points in history. So Google isn’t going to know that you were on Pornhub 3 pages ago, for example.
I don’t believe that’s possible. I think at one point there was a way to disable all access to the history API, but I don’t believe that option exists anymore. Additionally, it would break a lot of websites.
Unfortunately I think this is probably a result of the way YouTube implements their “auto play next video” feature, and they are unlikely to change that.
An option might be using an alternative YouTube front-end, rather than using the YouTube site, but I don’t have a lot of experience with those. (other people on here do though)