I work on a kiosk (MedifriendRx) which, to some degree "replaces" pharmacists and pharmacy staff.
The kiosk is placed inside of a clinic/hospital setting, and rather than driving to the pharmacy, you pick up your medications at the kiosk.
Pharmacists are currently still very involved in the process, but it's not necessarily for any technical reason. For example, new prescriptions are (by most states' boards of pharmacies) required to have a consultation between a pharmacist and a patient. So the kiosk has to facilitate a video call with a pharmacist using our portal. Mind you, this means the pharmacist could work from home, or could queue up tons of consultations back to back in a way that would allow one pharmacist to do the work of 5-10 working at a pharmacy, but they're still required in the mix.
Another thing we need to do for regulatory purposes is when we're indexing the medication in the kiosk, the kiosk has to capture images of the bottles as they're stocked. After the kiosk applies a patient label, we then have to take another round of images. Once this happens, this will populate in the pharmacist portal, and a pharmacist is required to take a look at both sets of images and approve or reject the container. Again, they're able to do this all very quickly and remotely, but they're still required by law to do this.
TL;DR I make an automated dispensing kiosk that could "replace" pharmacists, but for the time being, they're legally required to be involved at multiple steps in the process. To what degree this is a transitory period while technology establishes a reputation for itself as reliable, and to what degree this is simply a persistent fixture of "cover your ass" that will continue indefinitely, I cannot say.
Pharmacists are not going to be replaced, their jobs like most other jobs touched by AI will evolve, possibly shrink in demand but won't completely dissapear. AI is a tool that some professional has to use after all.