Generally, the official ROS2 (Humble) Tutorial on how to make a robot simulation from scratch is this:

which is quite verbose, including how to use it in Gazebo:

Beware that Gazebo Classic is EOL, if e.g. you are using ROS2 Humble, the official Gazebo Version would be Gazebo IONIC.

This should solve your problems 1. 2. and 4.

Painting is another thing. My best guess is:

“Paint” could a static model in Gazebo. Gazebo let’s you spawn models while it’s running. If you define a ROS2 service to spawn a paint-model on the position and heading of your robot, you might get it good enough. The robot could just call that service whenever if wants to paint.

Beware you are spawning stuff in the Gazebo-frame not map, odom ROS2 frames etc. Curves would naturally never be perfect, since everything would be a string of straight paint pieces.