Lots of people get this bit wrong, but this is the procedure from Wurth.
And was used when I worked on cars.
Red rubber grease goes under the seal ONLY, or if you like in the groove the seal fits into.
Red rubber grease can cause binding if applied to pistons.
Most brakes start binding due to corrosion in this groove caused by the fluid being Hygroscopic the water in turn then cause corrosion which in turn pushes the seal out of the groove binding the brakes. When very very bad the piston will then bind on the seal and can pull it out of the groove, usually the dust seal goes first.
Red rubber grease helps stop the water thus the corrosion.
The high temp grease should be applied to the pistons, slide pins and back of pads.
This will help when fitting pistons back in, less chance of picking up seal when pushing into place.
It also helps keep dirt out of the piston when in use by collecting dirt which is then wiped of the piston by the dust seal.
Remove callipers but not lines.
Remove pistons on bike first using the bikes hydraulics. Pump brakes to push pistons nearly all the way out, usually one or two will come out quicker than the others, hold these ones back say with a piece of wood and pump brake to push the others out.
When one or two have come out you can pull the others out. Dry first and try with your fingers. Don't use anything that can damage or mark the pistons, use piston pliers.
This bit can be the hardest part depending on the amount of binding if any. Note the brake fluid will pour out and you don't want it all over you bike, lots of paper towel.
Remove calipers from lines. Tie up high to stop them dripping
Inspect pistons for damage should be perfect.
Clean outside of brake and dry up any brake fluid left first away from build area.
Have a clean area to build in ready.
With a small sharp pick carefully prise old seals out of their retention groove without levering on the edges to do so, try not to slip and score bore.
With a suitable tool scrape any corrosion from the seal seats, again take your time and be careful. You should see aluminium and not white corrosion. make sure all is removed and to full depth.
Inspect bore for any damage, scrapes, scratches marks etc. should be perfect.
Again clean caliper and dry.
Assembly is fairly easy.
Red rubber grease in seal groove and on seals, doesn't need to be too much just enough to cover all exposed metal and seal. too much and it can stop seal going to full depth.
Fit piston seal in place first and using a suitable tool make sure it is pushed into groove to full depth. Smooth clean round piece of plastic can be used with a touch of the high temp grease or just a finger.
Then fit dust seal in same way.
Liberally coat piston with the high temp grease and push this into the bore, keep piston square to the bore and it should go in with firm pressure. Repeat
This sounds worse than it is in reality but it is your brakes.
Strip, clean, build.
If you are not confident or unsure about anything get professional help.
This is a guide only and should be carried out by professionals in brake systems.
Hope I haven't missed anything.