I expect most calculators online just run a subset of all possible boards as a representative sample - for example on ProPokerTools if you run a heads up hand against a random hand you get an exhaustive result (across 2,781,381,002,400 trials if running a random hand against a random hand - obviously less if a hand/range is specified for Hero), but if you run any hand/range against 2 or more random hands, you get a 600,000 trial sample. This obviously means you lose some accuracy - running a random (or 50% HU) hand against multiple random hands doesn't always give exactly 33.33%, 25.00% and 20.00% against 2, 3 and 4 Villains as it should for example, as you've already found based on the last sentence in your question.
Have you tried running the same matchup multiple times on the online calculators you're using to confirm that the results are deterministic? If they are, then perhaps there's no "trick" being used, but they are just running an exhaustive calculation and just have enough processing power to achieve this - have you tried scaling your existing approach to multiple random Villains and found that the processing time is prohibitive?
Having said all of that, I think there might be a way to derive the equities for Hero and any number of Villains with random holdings without doing an exhaustive calculation, as the relationship appears to be linear (giving some leeway for the fact that my equities were generated from 600k samples on ProPokerTools):
However, we'd need to identify more than the exact nature of the linear relationship between Hero and Villain equities to solve this for the general case - the distribution of points along the linear relationship for each Hero hand is also key - it looks like this reduces in inverse proportion to the number of Villains, but we'd need to do a bit more work to establish whether the equity for a given hand against any number of random hands can be derived just by knowing the equity of that hand against a single random hand. This may be beyond my mathematical capabilities, so perhaps someone else could get this over the line and hopefully this was still a helpful answer.