There's serious nerd sniping potential in asking how best to construct an automatic bidder, especially with the speed and scale requirements in place. It's an incredibly deep problem, and I don't believe there is a single right answer.
The problem is that it is unwise to trust an bidding algorithm designer whose incentives are aligned against yours. Google benefits from higher winning bids.
In the ad tech space the only winners are the people building and operating the adtech; everyone else is a sucker.
The only truly novel version of it which I have seen emerged from the Turkish hypercasual games space, where they managed to construct a giant audience everyone else thought was worthless, funnel them into their games, and then use the attention in the games to sell access to this apparently worthless audience.
Of course the audience actually were worthless, because all they were really interested in was new free hypercasual games, so the real suckers here were other devs that paid to access this audience but didn't have the adtech chops to make the most of it before the players moved on, and they funded their competition in the process.