The thing to remember is that it's all simple PHP - just classes.
The next thing I'd like to point out is that you don't have to use CI's Controller class - it just provides the current Request, Response, and Logger objects, with a couple of helper methods involved. You can use any class that you want as a controller and it should work just fine, I believe.
Assuming you do want to use the current Controller class, you would just create a new class that extends \CodeIgniter\Controller and use that as one of your BaseController's. Then, your controllers would extend that new class. So, something like:
File: application/BaseClasses/Controller.php (or wherever you want to store it)
Code:
<?php namespace App\BaseClasses;
class Controller extends \CodeIgniter\Controller
{
public function __construct(...$params)
{
parent::__construct(...$params);
// Do your stuff here...
}
}
File: application/Controllers/UserController.php
Code:
<?php namespace App\Controllers;
class UserController extends \App\BaseClasses\Controller
{
public function index()
{
echo view('users/index');
}
}