Building on what
@PrivateDonut highlighted, a 32-bit application or program has a maximum permissible integer value of 2,147,483,647. This value corresponds to the gold cap: 214,748 gold, 36 silver, and 47 copper. This is because, at its core, the database stores money as a singular integer. While it's theoretically possible to raise this currency ceiling, the process would be overly intricate and significantly more complicated than it seems. One could treat Copper, Silver, and Gold as distinct currencies, but such a change would necessitate an extensive overhaul of the core system, making it an impractical solution.
@PrivateDonut also shared a proven method involving gold bar conversions. Numerous private servers have previously implemented this method with variations like gold piggies, bars, or cloth. The choice is up to your imaginative discretion. However, introducing such systems can complicate matters, so simplicity is key. Decreasing gold drops and offering fewer gold rewards from quests is a recommended approach. While large figures may be visually appealing, they are sadly constrained by technology. Fortunately, this issue has been addressed in subsequent game versions which now operate on a 64-bit client. You might find exploring "Wrath Classic" insightful.