AI milking is a means of exploiting the AI's special rules for profit. The AI war economy can be exploited by the player, so long as the enemy country has little to spend money on.
At all of the higher difficulty levels of play, the EU2 AIs "cheat". Among other benefits, they receive income from all owned provinces regardless of looting or control, and they can mint without ill consequence because their inflation is capped. The AI does have a maximum percentage that it can use for minting at the higher difficulty levels; it is not 100% as it is for the easy difficulty levels. One-province AI countries have an additional cheat at the higher difficulty levels that gives them many times their entitled level of income.
Unlike a player the AI will be able to build units in a war incessantly, so long as they control any uncovered province where they have Build Capacity. This makes it imperative for the human player to cover an enemy's country entirely, as soon as possible.
Here's how to exploit any AI enemy once at war. First, destroy the enemy army, cover every enemy-controlled province and siege him down. Once you have 100% warscore, do not make peace. Instead, remain at war. (This is a good time for synchronized looting.) The enemy will typically keep sending you peace offers, and you can watch these to see how much money he is accumulating. You'll notice the enemy treasury tends to increase up to some point. The peak treasury may reach only 300d for small enemy countries; larger countries can reach a larger peak. You may be offered slightly more than the peak amount; the extra represents less than one month's minting for the enemy because the AI mints at its maximum rate until it reaches or exceeds the peak. Random or scripted events may raise or lower the enemy treasury. Other than the possibility that the country begins with more than the peak amount in the treasury as does Ragusa in 1419, then only by event will you receive much more than the peak amount in war reparations. The enemy can repay loans if they come due. Also, the enemy treasury goes down sometimes because the AI is usually able to send merchants, colonists, or diplomats. Basically though, you can usually get around 300d per enemy country, if you just wait long enough. Well, generally speaking you can wait that long.
When you finally do make peace, you can accept the enemy's proposal if it accords with your plans. Often you'll have to counter-offer, if you want to vassalize or force convert, or if the enemy has provinces which you don't want to take.
The 300d once per country is nice, but how about repeatedly? Can you do that? You can if you have a very small country, a monarch with great administration, or some Fine Arts Academies, such that a loss of five stability is not much of a problem. Here's how.
First, it's important to have a permanent casus belli on some enemy country; otherwise the badboy costs of war are probably too extreme. A permanent CB allows you to DoW repeatedly for only 1BB per war. Europeans can DoW pagans for zero badboy. Pagans aren't very profitable for looting. However, many pagans come up with the 300d; and they are often easy to assault. Some pagans might not mint money faster than they can spend it on pointless competition in a CoT. Merchant placement is expensive for pagans; if pagans have no gold income and there is competition in their CoT, then they might not give much money. The enemy country should be small enough that you can defeat it at least once; if it has allies, either you should be able to defeat them, or else they had better not be able to reach you effectively.
In the first war, you destroy the enemy army and take control of his domain, as above. If the enemy has allies which can get to you, you must defeat them too; otherwise just ignore them. If the enemy's alliance contains too many members who can get to you, you'll want to end up vassalizing some of them (to remove them from the alliance). The only limit to the size of the enemy alliance that is ideal is dependent on the amount of territory you must cover and siege, your number of diplomats, and how many AI separate peace proposals you can accept at one time. The AI alliance leader will not offer a separate peace.
Next, you just wait until the total amount the enemies offer is as large as it seems you'll get -- you should get at least 300d from some, and probably smaller amounts from the others. Make sure you've got a covering force, at least, on each enemy province. And you should store up one diplomat per enemy country, plus one. Now you pause the game and make separate peaces, taking as much money as you can get. (You may be able to save a diplomat or two if you can use enemy-proposed separate peaces.) Next, redeclare war. (This causes a huge -5 stabhit for breaking the truce, but by assumption you are able to repair stability fairly soon without stability investment.) When you made peace, each of your armies was placed into noncombatant mode; you can cover or siege the enemy provinces with them by simply ordering a move, and cancelling it. Finally, you can unpause the game.
The sequence above ensures that the enemy never has a place he can build an army. Thus, you can iterate it as many times as you like. The downside is that you don't have any break to zero out your war exhaustion. (While there are no rebellions, you do drop war exhaustion very slowly during the period of "inactive" war after you've sieged the enemy down.) If you must take a break, then you will have to deal with the possibility of the enemy recruiting new armies.
You can take a break for a month or a very few months of peace by zeroing enemy treasuries, making total peace on the last day of a month and then pausing and making your DoW in a following month. Only if the AI gets a boost to treasury by event can the AI build many military to oppose you. You have some time to position your troops in expectation of the one or two tiny armies. It is a good idea to demand military access from all countries in the alliance that you would not DoW anyway, especially those you do not have CB on. That way the morale of your troops does not suffer as you wait to DoW; and you have better supply for easier sieges or fighting rebels and to protect you from winter or tropical conditions.