Generally speaking, for absurdly large numbers such as in idle games you'll want to store the number as separate pieces. There are several ways to do this. For starters, rather than using a series of if/then statements, you should be able to cover n number of digits with a single function, by getting the length of your number with len(number) or just getting the relevant portion of the number with left(number, relevantdigits). There should be a lot of posts about how this is applied to break up numbers. You'll always have to define labels/suffixes individually though. For a cleaner but more complicated system, you could store your suffixes in an array.
To handle mega large numbers, one way is to push values into array cells. The most straightforward way would be for each digit to have it's own cell. The width of the array would correlate to the number of digits in the number, and each digit could be represented by multiplying itself with 10^xindex.