From the sound of your problem, I think you should be looking at the transmission fluid. The reason is something you said in your question — you have never changed the transmission fluid. If that is case, then I am assuming that you haven’t taken the time to look at the tranny dipstick, either. If that is the case, then you don’t know if you have enough transmission fluid in the housing.
The symptoms you are describing are those that could be associated with lazy or poorly working solenoids (though the transmission would likely not be shifting at all if the solenoids were shot and your Mazda would be limp mode). You might not think that a transmission could work if it were really down on fluid, but that isn’t the case.
If the amount you have lost is just on the right side of operational then your transmission will work more or less correctly because the internal pressure that is built up by the transmission will force transmssion fluid into enough of the transmission to cause it to work. Note, though, that it does take time for the pressure to build and you note that the transmission does take time to engage.
You also note that the transmission light comes on and this also indicates a probable problem with the fluid. Tell me, by the way, did the AT light blink or not? If it blinked it means the problem is worse than you might expect.
At this point, you might think I would recommend a transmission drain and refill and, normally, I would, but, your Mazda as 220K on the odometer and the tranny fluid has been in there a long time, as has the filter. Everything is pretty much happy working together. The fluid — the amount that’s in the housing — gearing, torque converter, clutches, solenoids and all the rest are happy with the status quo. Indeed, even though your transmission filter is likely full and not doing its job, I still wouldn’t worry that much because it is quite happy to be in the condition it is in.
Given all the foregoing, here’s what I would suggest. Warm your car up and check the transmission fluid level. Check the following link to see how to view the transmission fluid level. If you find it is down a bit, obtain the right fluid and add it to the transmission until the fluid is at the full line. This may just do the trick.
Here is one caveat: The new fluid may just have enough detergent value to start removing the happily built up deposits within the transmission (everything is used to its partners). In turn, the debris is likely going to start circulating through the transmission, possibly plugging up already narrowed galleries in the valve body or plugging check valve action in the same device. Once this happens, you are honestly on your way to a new transmission.
Maybe it’s your best move to obtain a used transmission from a salvage yard and have it swapped in? It could save you lots of pain.