It does sound like a hard water problem.
Here is a site with info, check out 22 and 28.
Fixing this can be a bit of a pain as it depends on the chemical composition of the hard water, you will have to try different things.
Sometimes using more detergent helps.
Sometimes changing the detergent brand or type helps.
I would use granulated dishwasher soap. Also low phosphate soap can cause problems.
Sometimes you just have to live with it and run a clean cycle as required.
The heating element seems to be working OK. It has water on it and when it heats up the water evaporates so it coats the element with calcium etc.
I would clean the unit.
Let it fill and then add a quart of vinegar.
Let it run for a few seconds and then stop it and let is sit for 15 minutes or so.
Then run it for a couple seconds and let it sit for 15 minutes.
I would do this for at least a couple hours.
You are trying to let the vinegar do it's job of dissolving the residue so you have to keep everything wet hence turning it on every 15 minutes but not letting it drain.
Then let the cycle continue till the end and with luck the residue will be gone or greatly reduced.
Note: There is no guarantee that the vinegar will work, it depends on the residue's chemical composition.
You could take a flake of the residue and put it in pure vinegar to see if it will dissolve as a test to see if the above is worthwhile.
I would also check your water level.
Most units fill to just under the heating element.
The most common cause is a dirty screen filter on the input side of the fill valve. Remove the valve from the unit and clean/check the filter. Yours may be coated with residue or be partially plugged bu residue that has come of the plumbing pipes.
Do not permanently remove it from the valve as it is there to keep crud out of the valve which could hold it open and cause a flood.
If it still does not fill correctly I would replace the fill valve.
PS: Be sure to shut off the power and the water supply to the unit. Have paper towels etc. handy to wipe up any spilled water. Get a small pan/bowl etc. that will fit under the valve then loosen the input water line let it drip into the container emptying it as necessary. This will minimize the amount of water spilled.