Just tested this with 1.20-rc1, this is appearing to be resolved as fixed. I used a MASSIVE command that is not 1000+ characters, not 10000+, but 20 thousand characters long. And it ran perfectly like if it were from a command block.
/give @p potion{CustomPotionEffects:[{Id:6,Amplifier:0b,Duration:-1},{Id:7,Amplifier:0b,Duration:-1},{Id:23,Amplifier:0b,Duration:-1}]} 1
Expected behavior of the potion: Apply Instant Health, Instant Damage, and Saturation for an infinite amount of tics, similar to other effects.
Actual behavior: Only applies it for 1 tic. It doesn't work if it's just a really big number either, itll only do it for 1 tic regardless of Duration.
For the amplifier part, yes, that appears to be a similar issue, however, /effect seems to be able to apply these effects with amplifiers above 127 perfectly fine.
Sort of a workaround but you can now make food items that have a 100% chance to give effects, even Saturation/Instant Health/Instant Damage that have more than 1 tick