This mod solves the problem, by modifying tModLoader's shop setup process. It provides each mod with a new empty inventory to put items in, then combines the inventories. This new Expanded shop is then divided into pages for displaying.
(Gfycat may have eaten a few frames there...
This is supposed to be every item from vanilla,
Thorium, Calamity, Spirit and imkSushi's Mod
resulting in over 200 pages.)
More technical information and downloads available on GitHub: https://github.com/DRKV333/ShopExpander
The mod is also available on the mod browser.