Firebolt is slightly better if you are alone, with a party toll is better, but it does not matter so much in practice
I'll assume the fight will take three rounds of combat. That is the generally expected number from the DMG, and also matches damage output calculations from many builds.
The expected damage from firebolt (1d10 fire, without special features) is a raw 5.5 per shot. The to hit rate across levels is 65%. Both cantrips will scale to multiples at higher levels, so any modifications will apply to the higher level versions the same way, and we can just look at the base damage. Many monsters in the Monster Manual are resistant or immune to fire1, so for the "average" monster and for play across all 20 levels, fire is expected to deal only 80% of damage (obviously, it will deal half or none against some, full against others, so the idea is this is the averaged value across all those fights). The average to hit rate is 65%. The rate to crit and deal double damage is 5% (on a nat 20). That gives us
Expected firebolt damage = 5.5 * 65% * 80% + 1/20 * 5.5 * 80% = 3.08, or 9.24 points over 3 rounds of combat.
The expected damage from Toll of the Dead it is more complicated. If there is nobody else attacking, then you first have to damage the target yourself. I think in practice it is very likely that some opponent also will be hurt by one of your party members, so in practice the output will be higher, but let's establish this as a baseline. The saving throw success rate against Wisdom saves is 59%2. Much fewer monsters are immune to necrotic damage, so that the factor for necrotic on expected damage across all possible monsters is 93%, calculated the same as for fire.
Then there are the following scenarios
Round 1 |
Round 2 |
Round 3 |
Likelihood |
Unresisted Damage |
Save |
Save |
Save |
41%^3 = 6.8921% |
0 + 0 + 0 = 0 |
Save |
Save |
Fail |
41% * 41% * 59% = 9.9179% |
0 + 0 + 4.5 = 4.5 |
Save |
Fail |
Save |
41% * 59% * 41% = 9.9179% |
0 + 4.5 + 0 = 4.5 |
Save |
Fail |
Fail |
41% * 59% * 59% = 14.2721% |
0 + 4.5 + 6.5 = 11 |
Fail |
Save |
Save |
59% * 41% * 41% = 9.9179% |
4.5 + 0 + 0 = 4.5 |
Fail |
Save |
Fail |
59% * 41% * 59% = 14.2721% |
4.5 + 0 + 6.5 = 11 |
Fail |
Fail |
Save |
59% * 59% * 41% = 14.2721% |
4.5 + 6.5 + 0 = 11 |
Fail |
Fail |
Fail |
59% * 59% * 59% = 20.5379% |
4.5 + 6.5 + 6.5 = 17.5 |
The total expected damage, weighted by share of the outcomes, gives us a total before resistance of 9.642842, and adjusted by 93% that sticks, we get
Expected toll of the dead damage = 8.97.
That means, in single combat it is actually ever so slightly worse than fire bolt.
In a party of four, on average 1-2 characters will go before you. Wizards tend to have OK Dexterity to shore up their weak AC, but it's usually not as good as that of Dexterity based classes like rogues, or martials that prefer finesse and ranged weapons, or have initiative boosting featurs like the Gloom Stalker ranger. So the bias may be a bit toward 2 characters going first. (Also, as @Kirt pointed out, you could delay casting the cantrip until your allies all attacked with the Ready action, at the risk that you might be disrupted and lose concentration.)
If even one other character goes before you, in 65% of all cases they can hurt the opponent. A pre hurt opponent will change all these 4.5s into 6.5s, a difference of 2 points for over 93% of all the possible outcomes where you would make an attack against an unhurt opponent that hits, or over 1.7 points after resistances are also accounted for.
So in practice it will be better than fire bolt, because this means an uplift of at least 0.65 times 1.7 points, more than a full point, putting you above 10 expected damage with toll of the dead, for the fight. With extra attacks and Ready shenanigans it can be up to about 10.7 points.
So numerically, toll of the dead is indeed slightly better, but in practice, this may not matter so much. Players often optimize their attacks depending on the situation at hand. If you have monsters that you can kill with one shot, some of the extra damage may be wasted, because taking out an opponent is often better than maximizing the points of damage dealt: they will stop hitting back. These slightly better expected points may thus account for less practical impact than numerical analysis would suggest, and it probably is a question of player preference what cantrip to pick.
(I still would pick fire bolt, due to all the other utility, and because rolling attacks is somehow more fun than having opponents save).
1 This is based on tabulating the immunities and resistances for all monsters in the Monster Manual in a spreadsheet, and counting damage against immune ones as 0, against resistant ones as 50%, against those without resistance or vulnerability as 100%, and against those with vulnerability as 200%, then averaging it. The damage after accounting for this for fire up to CR10 is 90%, and all the way up to CR20 is 80% (a lot high CR demons, devils etc. are either immune or resistant to fire).
2 I got to these numbers based on tabulating all the monsters and their Wisdom bonuses in a spreadsheet, then comparing this against the character's expected spellcasting ability bonus (starting with +3 at level 1, and assuming they are using ASIs to increase it to +4 at level 4 and +5 at level 8) and the resulting spell casting saving throw DC. 61% is based on monsters up to CR 10; for all monsters up to CR20 it is 59%. 95% of play happens in the low and mid tier levels, but this question is in particular concerned also about higher levels so I am using the overall number. If you only plan to play up to about level 10, you would need to adjust for this.
P.S. To future-proof this answer a bit, with the 2024 rules wizards will be able to switch out a cantrip per day, so this may matter less -- when you know you will face demons, you can just elect to learn toll, or another less resisted cantrip.
P.S.S. Specifically for an Evocation school wizard of 6th level or higher, your Potent cantrip feature would mean that creatures still take half damage of your damage cantrips if they save against them; as your minimum damage at that level would be 2d8 with toll of the dead, this would essentially ensure that all attacks in the second and third round are made with d12, bolstering the superiority of toll of the dead. Conversely, if you were a sorcerer with a fire draconic bloodline, fire bolt would be far superior, because you get to add your charisma ability modifier to the damage each time, which is likely at least +3 - but as a sorcerer, you wouldn't have access to toll normally anyways.
This answer is indebted to @Darth_Pseudonym, @Kirt and @TheLittlePeace, whose insightful comments helped to improve this answer from what it otherwise would have been.