You need an Ioun Stone of Intellect.
You've cited the relevant material for determining the canonical intelligence of a donkey. Horses have an intelligence of 2, and if you've ever met a donkey, you know that giving the donkey a 2 is generous. That said, we do have a method for applying a modest intelligence boost to the donkey.
It may be difficult to get your dumb ass to do this, but it should work. This answer establishes that it is possible for animals to attune to magic items. Fellow donkey handler and stack user Pyrotechnical suggested in a comment: "Put the ioun stone in a salt lick to keep the donkey focused on it for the necessary hour." If you can get the donkey to attune to the Ioun Stone, we have overcome the first obstacle.
The second obstacle has to do with the stone itself:
When you use an action to toss one of these stones into the air, the stone orbits your head at a distance of 1d3 feet and confers a benefit to you.
The donkey needs to toss the attuned stone into the air to begin benefiting from it. This can probably be achieved by balancing the stone on the donkey's snout and kicking it, causing the snout to rise rapidly, tossing the stone into the air.
If done correctly, these steps will confer your donkey with the following benefit:
Your Intelligence score increases by 2, to a maximum of 20, while this marbled scarlet and blue sphere orbits your head.
Your donkey is now 2+2=4 smart.
When you need to end the effect, returning your donkey to it's humble 2 smart state, you can grab it:
Thereafter, another creature must use an action to grasp or net the stone to separate it from you, either by making a successful attack roll against AC 24 or a successful DC 24 Dexterity (Acrobatics) check.
Notably, this separation will not end the donkey's attunement to the stone, so to reapply the intelligence boost, you will only have to redo the snout toss trick.
Headband of Intellect: How smart is too smart?
The Headband of Intellect is another option, but this may be way overshooting your goal here:
Your Intelligence score is 19 while you wear this headband. It has no effect on you if your Intelligence is 19 or higher without it.
Do you really want a donkey with an intelligence of 19 when you could give yourself an intelligence of 19? Just think, this could be you: