Im sure these days it's not hard enough to find smth with equilavent processing power in that price range
Maybe even direct contact with hetzner could help you out these days(they stopped offering them cause of abuse)
And if it's not a gpu bound task but badly concurrently cpu tasks Then maybe a game server specific dedicated hosting (they use consumer CPUs with uo to 5+ghz single core performance) wouldn't also be a lot of money
N if its a good concurrency task then the amd CPU offering of hetzner beats all(high memory, insanely fast iops, lots of core) , and has a offering for 5950x these days
The M1 actually beats it in single core performance, and is quite a bit faster at running JavaScript for that headless browser due to design optimizations.